From kde-panel-devel Wed Dec 31 02:11:54 2008 From: "Dong Tiger" Date: Wed, 31 Dec 2008 02:11:54 +0000 To: kde-panel-devel Subject: Re: How to adjust applet size according to its child QGraphicsWidget? Message-Id: X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=123070131621512 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0071535901==" --===============0071535901== Content-Type: multipart/alternative; boundary="----=_Part_101194_8446323.1230689514994" ------=_Part_101194_8446323.1230689514994 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline No luck:( 2008/12/30 Marco Martin > 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@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel > ------=_Part_101194_8446323.1230689514994 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline No luck:(

2008/12/30 Marco Martin <notmart@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@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

------=_Part_101194_8446323.1230689514994-- --===============0071535901== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============0071535901==--