Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.3
-
None
-
-
1082038bd (dev), b141b2066 (6.6), 354d23f93 (tqtc/lts-6.5), 4e6f7ad26 (dev), 8fc4a796b (6.6), 4b0232984 (tqtc/lts-6.5)
Description
Steps to reproduce:
1. Run the sample app qt_incorrect_scroll_offset_bug within the attached incorrect_scroll_offset.zip
2. Select any tab other than the first tab.
3. Click on the Toggle Directions button to change the TabPosition.
4. Observe that the tab widget appears with an incorrect scroll offset, starting from the selected tab index.
Expected behavior:
When changing the TabPosition via QTabWidget::setTabPosition, the QTabBar should maintain the correct offset and display the selected tab properly without scrolling.
Actual behavior:
When a non-zero tab index is selected and the TabPosition is changed, the tab bar is incorrectly scrolled, causing tabs before the selected tab index to become hidden. This results in an incorrect display where some tabs are not visible, even if there is available space in the tab bar.
Note:
Additionally, it should be noted that the scroll offset is reset if any other tab index is selected, indicating that the issue is specific to changing the TabPosition.