How to adjust applet size according to its child QGraphicsWidget?

Dong Tiger idlecat511 at gmail.com
Tue Dec 30 13:25:28 CET 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20081230/b6bdd50c/attachment.htm 


More information about the Plasma-devel mailing list