qt5base-lts/tests/auto/widgets/itemviews/qtablewidget
Christian Ehrlicher 3e59a88e89 QAbstractScrollArea: fix sizeHint when widget is not visible
QTable/QTreeView did not follow the documentation and returned
their needed size with scrollbars within viewportSizeHint().
Then sizeHint() also took the size of the scrollbars into account
when the policy was set to ScrollBarAlwaysOn.
This lead to different results when the widget was shown/hidden and/or
the scrollbar was visible or not.
Fix it by only adding the additional size when the scrollbars are
really visible. Also use header->isHidden() instead of isVisible() in
QTreeView the same way it is done in QTableView.

[ChangeLog][QtWidgets][QAbstractScrollArea] QTableView/QTreeView are
now reporting their viewportSizeHint() correctly taking into account
its scroll bars visibility and visibilityPolicy.

Task-number: QTBUG-69120
Change-Id: If50959a9f7429275e3e33122644c978fb64972ba
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-10-04 09:48:40 +00:00
..
.gitignore Moved tests into integrationtests/ and widgets/ 2011-10-20 19:45:41 +02:00
qtablewidget.pro Tests: Remove CONFIG += parallel_test. 2015-09-05 07:16:50 +00:00
tst_qtablewidget.cpp QAbstractScrollArea: fix sizeHint when widget is not visible 2018-10-04 09:48:40 +00:00