[Qt-interest] Anchor a QGraphicsPathItem to two QGraphicsWidget
Ori Lahav
vbcrlf at gmail.com
Sun Jun 13 20:46:28 CEST 2010
Hello,
The two widgets are directly on the scene, how can I use the
QGraphicsAnchorLayout? I can't set it as the scene layout.
Ori.
On Sun, Jun 13, 2010 at 6:54 PM, Sean Harmer <
sean.harmer at maps-technology.com> wrote:
> Hi,
>
> On 13/06/2010 14:01, Ori Lahav wrote:
> > Hello QTers,
> >
> > I have a few QGraphicsWidgets in a QGraphicsScene. They are connected to
> > each other with a QGraphicsPathItem. Instead of updating the paths
> > manually each time an item is moved, is there any way to anchor the path
> > to the two items?
>
> Change your QGraphicsPathItem into a QGraphicsWidget sub-class and then
> anchor your 3 widgets together using a pair of QGraphicsAnchorLayouts as
> needed. Although I am not sure how practical this is if you want to
> freely move your two existing widgets in relation to each other. Have a
> play around and see.
>
> Cheers.
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100613/4dd88ddf/attachment.html
More information about the Qt-interest-old
mailing list