Hello !
I'v got the following Situation:
I use a QGraphicsView to display Items, so called ClassBoxes.
So I derived a class ClassBox from QGraphicsItem , reimplemented :: paint(...) and everything is fine.
I also have another Class LWidget which holds all the ClassBox items.
I use LWidget->addClass(ClassBox* cb) to add new classes.
Now i want to spread them equally over the width of my QGraphicsView. I know I can use setPos(), but my ClassBoxes contain Text, and without drawing this text i can't get the boundingBox of this text which is about the size of my Classbox. And when I draw it, I get the boundingBoxes, but the Classes are at the wrong positions becasue I can't set them without knowing the sizes of my ClassBoxes.
Hope someone understands my cryptic textand can help me...
TIA, Simon
Bookmarks