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