Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
4.6.2
-
None
Description
By now scroll area know nothing about content's sizeHint.
According to sources:
qscrollarea.cpp
/*! \reimp */ QSize QScrollArea::sizeHint() const { Q_D(const QScrollArea); // ....... if (d->widget) { if (!d->widgetSize.isValid()) d->widgetSize = d->resizable ? d->widget->sizeHint() : d->widget->size(); sz += d->widgetSize; } else { sz += QSize(12 * h, 8 * h); } // ....... }
taking d->widgetSize.isValid() is not well correct... the only use of widgetSize previously set it to (0, 0) so IsValid always returns true and no content sizeHint.
Moreover, content widget 's sizeHint is not constant in some cases and it souldn't be stored.