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

ScrollButtons of QTabBar in QTabWidget always visible in case of defined right offset

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • 5.5.0
    • Widgets: Style Sheets
    • None

      In case you want free space at end of QTabBar in QTabWidget and using StyleSheets for it, ScrollButtons are always visible. This happens only if you you want right space at right side of QTabBar but not at left side. See attached screenshots.

      #include <QApplication>
      #include <QMainWindow>
      
      int main(int argc, char * argv[])
      {
      	QApplication qapp(argc, argv);
      	QMainWindow mainWindow;
      
      	auto tabbar = new QTabWidget();
      	mainWindow.setCentralWidget(tabbar);
      
      	tabbar->addTab(new QWidget(), "Test");
      	tabbar->addTab(new QWidget(), "Test2");
      	//tabbar->setStyleSheet("QTabWidget::tab-bar{ left: 20px; } ");
      	tabbar->setStyleSheet("QTabWidget::tab-bar{ right: 20px; } ");
      
      	mainWindow.show();
      	qapp.exec();
      }
      

        1. left.png
          3 kB
          Heiko Thiel
        2. right.png
          3 kB
          Heiko Thiel
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            EliteScience Heiko Thiel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes