Important: Please read the Qt Code of Conduct -

How to set QTabBar by objectName in QSS ?

  • One QTabBar need border-bottom, another QTabBar do not need.

    setStyleSheet("QTabWidget::pane { border:0; }"
                  "QTabWidget::tab-bar { alignment:center; }"
                  "QTabBar:tab { width:90px; height:40px; font-size:15px; }"
                  "QTabBar::tab:selected { color:rgb(0,131,221); }"
                  "#tabWidget QTabbar::tab:selected { border:none; border-bottom:1px solid rgb(0,131,221); }");
    tabWidget = new QTabWidget;
    QTabWidget *repertory = new QTabWidget;

  • Lifetime Qt Champion


    The ID selector follows this syntax: QWidget#widgetObjectName.

Log in to reply