[Interest] Questions about QGraphicsWidget

Jason H scorp1us at yahoo.com
Tue Aug 7 22:03:54 CEST 2012


"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."

Why and why? You might have to map a event coordinate to a client, but I don't see why that would be a problem. Either way you're not wrong though. It all depends on how much coding you want to do and how much you need to coordinate the objects.


What might work better is trying to do it in QML first, to work it out, and maybe even just use that? Without more details, I can't give better advice.




________________________________
 From: BRM <bm_witness at yahoo.com>
To: Interests Qt <interest at qt-project.org> 
Sent: Tuesday, August 7, 2012 3:28 PM
Subject: Re: [Interest] Questions about QGraphicsWidget
 
> 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,
TIA,


Ben

_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120807/423d8d9b/attachment.html>


More information about the Interest mailing list