<br><br><div class="gmail_quote">On Mon, May 26, 2008 at 5:04 PM, Oszkar Ambrus <<a href="mailto:oszkar.ambrus@deri.org">oszkar.ambrus@deri.org</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Alexis Ménard wrote:<br>
><br>
> See<br>
> <a href="http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp" target="_blank">http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/containments/desktop/desktop.cpp</a><br>
> wich is the containment for the desktop where applet are free to move.<br>
</div>Thanks, I will follow that example.<br>
<div class="Ih2E3d">><br>
><br>
> > 2) When I use QGraphicsLayout (actually it's<br>
> QGraphicsLinearLayout)<br>
> > inside an applet (for LineEdits and PushButtons), the<br>
> application<br>
> > always<br>
> > crashes, when I remove that applet.<br>
> ><br>
> ><br>
> > You put embeeded widget with QGraphicsProxyWidget? If yes, you<br>
> have to<br>
> > remove your applet from the scene before deleting it.<br>
> No, I didn't use QGraphicsProxyWidget. I added QGraphicsWidget items,<br>
> like Plasma::LineEdit and Plasma::PushButton.<br>
> Do they need to be removed too?<br>
><br>
><br>
> If you use PushButton from recent Plasma API you use<br>
> QGraphicsProxyWidget because they are proxywidget, so before deleting<br>
> your applet that contains your button and your line edit remove it in<br>
> the scene before. But if you call destroy on your applet, if it's the<br>
> case it's automatically done by the applet class.<br>
</div>What do you mean by removing from the scene? Removing the applets from<br>
the Plasma::Corona (QGraphicsScene)?</blockquote><div><br>scene()->removeItem(this)<br><br>but call destroy function of plasma applet, it will do this for you ;)<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
So I should either remove them in the Corona's destructor, or call<br>
destroy on them?<br>
<div class="Ih2E3d">><br>
><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Thanks a lot,<br>
> > Oszkar<br>
> ><br>
> _______________________________________________<br>
> Panel-devel mailing list<br>
</div>> <a href="mailto:Panel-devel@kde.org">Panel-devel@kde.org</a> <mailto:<a href="mailto:Panel-devel@kde.org">Panel-devel@kde.org</a>><br>
<div class="Ih2E3d">> <a href="https://mail.kde.org/mailman/listinfo/panel-devel" target="_blank">https://mail.kde.org/mailman/listinfo/panel-devel</a><br>
><br>
><br>
</div>> ------------------------------------------------------------------------<br>
<div><div></div><div class="Wj3C7c">><br>
> _______________________________________________<br>
> Panel-devel mailing list<br>
> <a href="mailto:Panel-devel@kde.org">Panel-devel@kde.org</a><br>
> <a href="https://mail.kde.org/mailman/listinfo/panel-devel" target="_blank">https://mail.kde.org/mailman/listinfo/panel-devel</a><br>
><br>
_______________________________________________<br>
Panel-devel mailing list<br>
<a href="mailto:Panel-devel@kde.org">Panel-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/panel-devel" target="_blank">https://mail.kde.org/mailman/listinfo/panel-devel</a><br>
</div></div></blockquote></div><br>