From e67e0580873c7de28c4439c60cc978b2f4d98f49 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 9 Oct 2009 13:39:41 +0000 Subject: [PATCH] remove the parentitem, so the widgets will stay still. give it a parent, so they will be deleted svn path=/trunk/KDE/kdelibs/; revision=1033105 --- corona.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/corona.cpp b/corona.cpp index afaa95466..020da99dd 100644 --- a/corona.cpp +++ b/corona.cpp @@ -456,6 +456,10 @@ void Corona::addOffscreenWidget(QGraphicsWidget *widget) addItem(widget); } + QGraphicsWidget *pw = widget->parentWidget(); + widget->setParentItem(0); + widget->setParent(pw); + //search for an empty spot in the topleft quadrant of the scene. each 'slot' is QWIDGETSIZE_MAX //x QWIDGETSIZE_MAX, so we're guaranteed to never have to move widgets once they're placed here. int i = 0;