Hi
I am creating a widget ImageView by subclassing QScrollView and passing the file-path of Pixmap in its constructor. Then I reimplement QScrollView's drawContents functions in my class:
void ImageView
::drawContents ( QPainter * p,
int clipx,
int clipy,
int clipw,
int cliph
) { p->drawPixmap( 0, 0, *_pixmap );
}
void ImageView::drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph ) {
p->drawPixmap( 0, 0, *_pixmap );
}
To copy to clipboard, switch view to plain text mode
But I am not getting the full functionality and also its not showing scroll-bars, while they are set to auto.
And also I am not getting the full understanding of the subclassing QScrollView, i.e what should the proper way...
thanks & regards
sumsin
Bookmarks