Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119366

QTabBar is incorrectly offset when changing the TabPosition

    XMLWordPrintable

Details

    • All
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            kandass1 Senthil Kannan Kandaswamy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: