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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.15.0, 5.15.1
    • Fix Version/s: None
    • Component/s: Widgets: Style Sheets
    • Labels:
      None
    • Environment:
      Windows and Linux, probably other platforms too
    • Commits:
      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
          Stanislav Yelenskiy
        2. tabbar.png
          15 kB
          Stanislav Yelenskiy
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: