order and parent the background according to the item

svn path=/trunk/KDE/kdelibs/; revision=1017945
This commit is contained in:
Aaron J. Seigo 2009-08-31 23:47:11 +00:00
parent 7830d10905
commit eb5b7d040c

View File

@ -133,6 +133,8 @@ void ItemBackground::setTargetItem(QGraphicsItem *target)
} }
if (target) { if (target) {
setZValue(target->zValue() - 1);
setParentItem(target->parentItem());
QRectF rect = target->boundingRect(); QRectF rect = target->boundingRect();
rect.moveTopLeft(target->pos()); rect.moveTopLeft(target->pos());
setTarget(rect); setTarget(rect);