PDA

View Full Version : QLayout on scenes



baray98
18th November 2008, 06:51
I have a bunch of QGraphicsRectItem and i want to manage them on a QGraphicsScene like what QGridLayout does to widgets.

I looked at QGraphicsGridLayout but this would like to reside on a QGraphicsWidget somehow. I want a layout kinda things that will reside on the scene.

What are my other options? All i want is to arrange a QGraphicsItems( RectItem) in grids ..

baray98

aamer4yu
18th November 2008, 07:42
If it is just once u want to layout the items,.,,, u can set the position manually using loops...
it wont be a much a burden i guess

baray98
18th November 2008, 18:22
Well, i think its doable but a little tedious since my number and sizes of my rects are variable , its all dependent on some files....

The best way that i could think of is that I will make a class that acts like a QGridLayout that resides on QGraphicsScene ( hoping i am not re-inventing the wheel).

Anymore opinion from the gurus..

baray98