be more careful with setWidget
svn path=/trunk/KDE/kdelibs/; revision=1002129
This commit is contained in:
parent
284bac4310
commit
0caae66c3a
@ -179,6 +179,15 @@ QString ExtenderItem::name() const
|
||||
|
||||
void ExtenderItem::setWidget(QGraphicsItem *widget)
|
||||
{
|
||||
if (d->widget) {
|
||||
d->widget->removeSceneEventFilter(this);
|
||||
}
|
||||
|
||||
if (!widget) {
|
||||
d->widget = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
widget->setParentItem(this);
|
||||
widget->installSceneEventFilter(this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user