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:
parent
19efbb9108
commit
93bf2933e4
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user