managingLayout() is a better way to get the layout managing the widget's geometry than parent()->layout() which doesn't work for top-level Widget instances.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=709899
This commit is contained in:
Robert Knight 2007-09-08 14:01:03 +00:00
parent 3dc0a4795f
commit 37b4ea6334

View File

@ -180,9 +180,9 @@ void Widget::setGeometry(const QRectF& geometry)
void Widget::updateGeometry()
{
if ( parent() && parent()->layout() ) {
parent()->layout()->invalidate();
}
if ( managingLayout() ) {
managingLayout()->invalidate();
}
}
QSizeF Widget::sizeHint() const