Search code examples
qttabsstylesheet

QT Tab bar's top highlight with stylesheet


I have a problem when trying to change the color of QTabBar's top line (blue line in the picture below).

enter image description here

Is this a separate part of tabBar (like scroller or tear) or its top border ? And how can I change its color with styleSheet and leave the other parts of tabBar unchanged?

P.S. : My tabBar::styleSheet returns an empty string, so I can't get current style and make changes in it.


Solution

  • Problem solved:

    setStyleSheet("QTabBar::tab:selected { selection-background-color: red; }");