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
This commit is contained in:
Marco Martin 2009-10-09 13:39:41 +00:00
parent d0ecf4ae88
commit e67e058087

View File

@ -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;