[Qt-interest] setSceneRect vanished my items from GraphicsView :(

Usman Ajmal uzmanajmal at gmail.com
Sun Jul 12 08:32:55 CEST 2009


Hi All,

I having a problem with a GraphicsView widget. I am trying to display 50
rectangles in the Graphics View widget but size of the rectangles are such
that i need horizental scroll bars to view all the rectangles.

My GraphicsView size is  (height, width) = (710, 530). When i set my scene
rectangle to say 'setSceneRect(-20,-20,10,10)', i see some of my drawn
rectangles. In order to view all rectangles i set the scene rectangle to
(-360,-256,1000,530). I set 1000 so that i may get a horizental scroll bar.

*Question:*

I now, got the horizental scroll bar but i don't see 'any' of my rectangles
at all. When i executed my program my rectangle just blinked and
disappeared, leaving behind a white graphiceView plate of confusion.

Any idea what i am missing here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090712/5cb0ce15/attachment.html 


More information about the Qt-interest-old mailing list