How to adjust applet size according to its child QGraphicsWidget?

Dong Tiger idlecat511 at gmail.com
Wed Dec 31 03:11:54 CET 2008


No luck:(

2008/12/30 Marco Martin <notmart at gmail.com>

> On Tuesday 30 December 2008, Dong Tiger wrote:
> > Hi,
> >
> > A QGraphicsWidget is embeded into Plasma::Applet through
> > QGraphicsLinearLayout. When this QGraphicsWidget's size changes, how to
> get
> > the applet's size adjusted accordingly?
> >
> > The code snippet looks like:
> >
> >   child = new MyGraphicsWidget(applet);
> >   layout = new QGraphicsLinearLayout(applet);
> >   layout->setSpacing(0);
> >   layout->addItem(child);
> >   applet->setLayout(layout);
> does calling applet->updateGeometry() work?
>
> Cheers,
> Marco Martin
> >
> > Regards,
> > --
> > Tiger
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20081231/19c80be2/attachment.htm 


More information about the Plasma-devel mailing list