Qt: hide border for selected tab in QTabBar

QTabBar has a 1px border that separates tabs from their contents.

QTabWidget::pane { border:1px solid #C4C4C3; }

I want the border to disappear under the selected tab, as was done in all browsers and most applications using tabs.

However, the installation style for the QTabBar :: tab does not help:

QTabBar::tab:selected { border-bottom-color:white; }

enter image description here

So how can I achieve this?

+5
source share
1 answer

This line is controlled by the upper bound QTabWidget::pane. For instance:

QTabWidget::pane { border: 1px solid #C4C4C3; top: -1px; }

will move the line behind / below the tabs (somehow using only topseems to completely remove the border).

+11
source

All Articles