Return correct width for minimum and preferred size.
BUG:212341 svn path=/trunk/KDE/kdelibs/; revision=1042611
This commit is contained in:
parent
22c6e31931
commit
d03a3ef5df
@ -269,6 +269,10 @@ QSizeF Frame::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
|||||||
d->svg->getMargins(left, top, right, bottom);
|
d->svg->getMargins(left, top, right, bottom);
|
||||||
|
|
||||||
hint.setHeight(fm.height() + top + bottom);
|
hint.setHeight(fm.height() + top + bottom);
|
||||||
|
if (which == Qt::MinimumSize || which == Qt::PreferredSize) {
|
||||||
|
QRectF rect = fm.boundingRect(d->text);
|
||||||
|
hint.setWidth(rect.width() + left + right);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return hint;
|
return hint;
|
||||||
|
Loading…
Reference in New Issue
Block a user