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

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

XMLWordPrintable

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

      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):

        1. image-2023-07-08-21-59-34-560.png
          7 kB
          thedmd
        2. image-2023-07-08-22-00-02-609.png
          8 kB
          thedmd
        3. QTBUG-115137.zip
          2 kB
          thedmd
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes