ya, I can see the Picture and it is always at top-left of viewport.
ya, I can see the Picture and it is always at top-left of viewport.
try resizeContents(yourpictureWidth,yourpictureHeight)
should I reimplement resizecontents() ?
And is my code of drawcontents sufficient?
I also attaching my ImageView.
Last edited by sumsin; 16th March 2006 at 14:03.
no need to reimplement it.
Just call the slot (not inside drawContents but somewhere before drawContents gets called).
I think the code inside drawContents will suffice.
why?Originally Posted by sumsin
what actually you want to do ?
a life without programming is like an empty bottle![]()
How about setting the image on a QLabel and placing the label inside the scroll view?
yes. So call resizeContents in function where you get your pixmap.but drawContents called automatically.
I actually want that at startup my widget opens in a default size and if the size of the image is larger than the size of viewport then it should show the scrollbars.
And when I resize the widget manually it should manage itself so that every time the image try to be in center.
it must help you!Originally Posted by munna
a life without programming is like an empty bottle![]()
thanks
my scroll-bars now appear.
One thing when I send the arguments in resizecontents as mypicwidth and mypicheight, but it not seem that the widget size match these arguments.
Widget size is lesser.
And how i put the image in center.
Should I apply some transformation in drawcontents function but I am not exactly understanding the means of clipx, clipy, clipw and cliph.
its ok becouse you draw it thereOriginally Posted by sumsin
![]()
a life without programming is like an empty bottle![]()
but drawContents called automatically.
plz guide me...![]()
Bookmarks