qt5base-lts/tests/auto/widgets
Volker Hilsheimer 2a7da1b3c8 QTabBar: recalculate scroll offset when showing
If an application sets the current index and resizes the tab widget
before showing it, then the scroll offset might be calculated based on
an old size. Since after ca15f650a1,
resizing explicitly avoids scrolling, this could result in tabs ending
up scrolled outside of the tab bar when showing the tab widget.

Fix that by explicitly making the current tab visible in the tab bar's
showEvent handler, which recalculates the scroll offset based on the
actual size.

This is only reproducible with a tab widget, which lays out the tab bar
for each change and resets the tab bar's layoutDirty flag. Add a test
case there.

Pick-to: 6.5 6.6
Fixes: QTBUG-114204
Change-Id: I1e9506b9dde1dd892291d108dd2c7b675ef99509
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
2023-06-06 21:49:02 +02:00
..
dialogs Allow disable native messagebox dialog 2023-05-02 10:37:17 +02:00
effects tests: blacklist tst_QGraphicsEffect::draw() on Wayland 2023-04-17 16:05:24 +02:00
graphicsview tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
itemviews Use boolean to indicate QTableWidgetItem is header item 2023-05-05 05:28:19 +00:00
kernel Add missing nullptr check in QWidget::setFocusProxy 2023-04-25 04:26:10 +02:00
styles Implement color role AccentColor in QStyleSheetStyle and QCssParser 2023-05-22 14:45:26 +00:00
util QCompleter::setPopup() - refactor and cleanup 2023-03-14 21:15:31 +01:00
widgets QTabBar: recalculate scroll offset when showing 2023-06-06 21:49:02 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00