[Interest] Questions about QGraphicsWidget
bm_witness at yahoo.com
Tue Aug 7 21:28:01 CEST 2012
> From: BRM <bm_witness at yahoo.com>
>Subject: Re: [Interest] Questions about QGraphicsWidget
>> From: Jason H <scorp1us at yahoo.com>
>>To: BRM <bm_witness at yahoo.com>; Interests Qt <interest at qt-project.org>
>>Subject: Re: [Interest] Questions about QGraphicsWidget
>>First, there is QGraphicsItemGroup, which would probably do what you want, and automatically provides a boundingRect() as the unsion of all child bounding rects.
> An interesting idea.
> I had been planning on using the QGraphicsItemGroup to capture the larger widget set with all the lines, text, and data displays; while having this widget just deal
> with the data and its overlay. And looking a little closer I guess I can add a group to be within another group...I'll have to look into this more.
I actually already did that in part - that is, my parent widget is a QGraphicsWidget, and it created a QGraphicsItemGroup and added the two sub-widgets to it.
However, in examining this aspect it now seems like the parent widget has no relationship to its child widgets - e.g. moving/resizing/etc the parent is not necessarily going to moving/resizing/etc the child widgets. Or (again) am I missing something? (Yes, the QGraphicsItemGroup is parented to the QGraphicsWidget.)
Converting the parent QGraphicsWidget to be derived from QGraphicsItemGroup also removes the ability to add a nice little management layer with signals and slots; it also removes the parent widget from being able to be added to a QGraphicsLayout.
Looking to learn,
More information about the Interest