I style my QTabWidget and got a weird line on top of the tab bar. It only happens when it has multi tabs.
QTabWidget::pane {
border-top: 1px solid #c4c4c4;
top: -1px;
}
QTabWidget::tab-bar {
left: 5px;
}
Any advice to fix this? Thanks.
You need to turn off the base in the QTabBar
:
QTabBar {
qproperty-drawBase: 0;
}
来源:https://stackoverflow.com/questions/33940257/qt-stylesheet-weird-line-on-top-of-tab-bar