Hi everyone
I'd like to implement a RubberBand zoom for an image viewer. I'd be grateful to anyone who lead me to the design information or an implementation of such a zoom function.
Sincerely
Cem
Hi everyone
I'd like to implement a RubberBand zoom for an image viewer. I'd be grateful to anyone who lead me to the design information or an implementation of such a zoom function.
Sincerely
Cem
Take image viewer example as a playground. See QRubberBand example usage in its docs. All what is left is to calculate a suitable scale factor and scroll bar values in mouseReleaseEvent().![]()
J-P Nurmi
Or use QGraphicsView - it's got a nifty function called QGraphicsView::fitInView() that many people use to implement rubberband zooming.
Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
Nokia Software Manager, Qt Development
Ya Bitto is right... but dont forget to convert the view cordinates to scene cordinates as fitInView() takes scene cordinates.
This subject is also running in another thread:
http://www.qtcentre.org/forum/f-qt-p...line-3596.html
Bookmarks