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

[REG 5.14->5.15] QTabBar last tab incorrectly styled after insertTab

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.9
    • 5.15.0, 5.15.1
    • Widgets: Style Sheets
    • None
    • Windows and Linux, probably other platforms too
    • b39b018f4a54252ee7a9ffada6d0f05f5896baaf (qt/qtbase/dev) 404b0cc60a65dedbcdc3417f567d9b21c55c359b (qt/tqtc-qtbase/tqtc/lts-5.15)

    Description

      After inserting a new tab between the current tab and the last tab, the last tab is incorrectly styled. See attached screenshot.

      Checked under a debugger, it appears that the internal state is not updated in this case. Specifically, QTabBarPrivate::lastVisible is not updated to reflect the index of the last visible tab. This results in the wrong tab styled, as if it was the last instead.

      It looks like the regression was introduced by this change, https://codereview.qt-project.org/c/qt/qtbase/+/255141

      Attachments

        1. main.cpp
          0.5 kB
        2. tabbar.png
          tabbar.png
          15 kB
        For Gerrit Dashboard: QTBUG-86898
        # Subject Branch Project Status CR V

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            stanislav Stanislav Yelenskiy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: