When updating a Widget's geometry, pass the geometry in the Widget's co-ordinates to layout()->setGeometry() rather than the parent widget's co-ordinates. Call updateGeometry() inside setGeometry().

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=701207
This commit is contained in:
Robert Knight 2007-08-17 16:28:54 +00:00
parent 19efbb9108
commit 93bf2933e4

View File

@ -165,6 +165,7 @@ void Widget::setGeometry(const QRectF& geometry)
d->size = QSizeF(width, height);
updateGeometry();
}
setPos(geometry.topLeft());
@ -177,7 +178,7 @@ void Widget::updateGeometry()
if (layout()) {
// kDebug() << (void *) this << " updating geometry to " << size();
layout()->setGeometry(geometry());
layout()->setGeometry(boundingRect());
}
}