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

QTabBar: Adding button to tab and making tab current "fake scroll" tab bar

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 6.5.1
    • None
    • Windows, VS2022 x64
    • Windows

    Description

      Adding tab to `QTabBar`, setting a button and then making tab current "scroll" content and show only last tab.

      constexpr int tabCount = 5;
      for (int i = 0; i < tabCount; ++i) {
          auto id = tabBar->addTab(QString("hello %1").arg(i));
          tabBar->setTabButton(id, QTabBar::RightSide, new QLabel("X", this));
          tabBar->setCurrentIndex(id);
      }
      

       

      Repro is included.

      Current (Qt 6.5.1):

      Hover over tab and scroll with mouse to make QTabBar look normal.

      Expected (Qt 6.4.2):

      Attachments

        Issue Links

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

          Activity

            People

              vhilshei Volker Hilsheimer
              thedmd thedmd
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes