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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important 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)

      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

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

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

              Created:
              Updated:
              Resolved: