Containments, Layouts

Alexis Ménard darktears31 at gmail.com
Mon May 26 16:23:10 CEST 2008


On Mon, May 26, 2008 at 5:04 PM, Oszkar Ambrus <oszkar.ambrus at deri.org>
wrote:

> Alexis Ménard wrote:
> >
> > See
> >
> http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp
> > wich is the containment for the desktop where applet are free to move.
> Thanks, I will follow that example.
> >
> >
> >     >     2) When I use QGraphicsLayout (actually it's
> >     QGraphicsLinearLayout)
> >     >     inside an applet (for LineEdits and PushButtons), the
> >     application
> >     >     always
> >     >     crashes, when I remove that applet.
> >     >
> >     >
> >     > You put embeeded widget with QGraphicsProxyWidget? If yes, you
> >     have to
> >     > remove your applet from the scene before deleting it.
> >     No, I didn't use QGraphicsProxyWidget. I added QGraphicsWidget items,
> >     like Plasma::LineEdit and Plasma::PushButton.
> >     Do they need to be removed too?
> >
> >
> > If you use PushButton from recent Plasma API you use
> > QGraphicsProxyWidget because they are proxywidget, so before deleting
> > your applet that contains your button and your line edit remove it in
> > the scene before. But if you call destroy on your applet, if it's the
> > case it's automatically done by the applet class.
> What do you mean by removing from the scene? Removing the applets from
> the Plasma::Corona (QGraphicsScene)?


scene()->removeItem(this)

but call destroy function of plasma applet, it will do this for you ;)


>
>
> So I should either remove them in the Corona's destructor, or call
> destroy on them?
> >
> >
> >     >
> >     >
> >     >
> >     >
> >     >     Thanks a lot,
> >     >     Oszkar
> >     >
> >     _______________________________________________
> >     Panel-devel mailing list
> >     Panel-devel at kde.org <mailto:Panel-devel at kde.org>
> >     https://mail.kde.org/mailman/listinfo/panel-devel
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Panel-devel mailing list
> > Panel-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/panel-devel
> >
> _______________________________________________
> Panel-devel mailing list
> Panel-devel at kde.org
> https://mail.kde.org/mailman/listinfo/panel-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/panel-devel/attachments/20080526/39498eee/attachment-0001.html 


More information about the Panel-devel mailing list