Important: Please read the Qt Code of Conduct -

How to get rid of strange white line under QTabBar while customzing QDockWidget thru stylesheet

  • I do have a QDockWidget that includes tabified dockwidgets.
    I am customizing the the QMainWindow stylesheet by the following stylesheet:

    QWidget { color:white; background: #757575 }

    QTabWidget { padding: 0px; border: 0px; background-color: #757575; }
    QTabWidget::pane { border: 0px solid #C2C7CB; top: -3px; background: #757575; }
    QTabWidget::tab-bar {
    subcontrol-position: top left;

    subcontrol-origin: margin;
    padding: 0px 0px 0px 0px;
    border: 0px;
    background: transparent;

    QTabBar { background-color : #757575; }
    QTabBar::close-button {
    subcontrol-position: right;
    QTabBar::tab {
    color: white;
    background: #757575;
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    min-width: 8ex;
    padding: 10px;
    min-width: 100px;

    QTabBar::tab::selected{ border-bottom: 0px solid #757575; background-color: darkgrey; }

Log in to reply