How to adjust applet size according to its child QGraphicsWidget?

Alexis Ménard menard at kde.org
Tue Dec 30 15:21:56 CET 2008


Unfortunately you can't it is a bug in Qt.

You can take a look to the task tracker of Qt Number 231114 and 211500. I
guess it is what you try to solve. The fix is in 4.4 branch (so scheduled
for 4.4.4) and in 4.5.

As a workaround you have to manage the resize of your applet by hand when
the size of the layout change.

2008/12/30 Dong Tiger <idlecat511 at gmail.com>

> 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);
>
>
> 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/20081230/4a179f75/attachment.htm 


More information about the Plasma-devel mailing list