PDA

View Full Version : QGraphicsItem to fullscreen



medved6
16th June 2010, 09:16
Hi Everybody again:-)

I have some subclass of QGraphicsItem and such items displayed on the scene.

Taking in acount all transfom(s) all items has rectangular shape.

If I do double click on the item, I want item displayed in "full screen mode". Full screen here means that I need to do such view transform that item will fit into viewport() but occupay maximum area( hope you'ce got it :-), simple speaking it's just full screen:-))) ).

Ofcouse I will use view->centerOn(center_of_item)

But is there any elegant way to do the view scale ?


Thank you!

high_flyer
16th June 2010, 09:28
http://doc.trolltech.com/4.6/qgraphicsview.html#fitInView

medved6
16th June 2010, 23:54
Thank you.
Sounds like exactly what I was looking for.