Fix CategoryFilterWidget::sizeHint()

This commit is contained in:
Vladimir Golovnev 2017-09-01 14:38:17 +03:00
parent 4cd3a37b4a
commit c6dfdf9135

View file

@ -167,11 +167,10 @@ void CategoryFilterWidget::callUpdateGeometry()
QSize CategoryFilterWidget::sizeHint() const
{
const QSize viewportSize {viewportSizeHint()};
return {
// Width should be exactly the width of the content
sizeHintForColumn(0),
// Height should be exactly the height of the content
static_cast<int>(sizeHintForRow(0) * (model()->rowCount() + 0.5)),
viewportSize.width(),
viewportSize.height() + static_cast<int>(0.5 * sizeHintForRow(0))
};
}