How do i get rid of this annoying line at the end of the QTabWidget
質問
So i have a fairly simple style sheet to change the look of the tabs in my Qt app (i'm using PySide, but it shouldn't make much, if any, difference); here it is:
QWidget{
background: gray;
}
QTabBar{
background: gray;
}
QTabBar::tab {
background: lightgray;
padding: 10 10 5 10;
font-size: 14px;
color: gray;
}
QTabBar::tab:selected {
background: gray;
color: white;
}
If i just use this; then I get an ugly line at the end of the tab - like this: (this is the top right corner of the app - if you resize it so that it goes beyond the size of the tabs)
If i add the following CSS to the style sheet:
QTabWidget::pane{
}
i get this:
which may look like it fixes the problem, but it does not -
here is the same against a different coloured background:
I then thought that perhaps it was the other lightgray
color in use, which would be better, since i want that part to be lightgray
anyway, so I changed the colour of the QTabBar
background to lightgray
.
Still no success.
The colour of the line is neither gray
nor lightgray
, yet those are the only two colours I use.
How do I get rid of this line?
I would rather a style sheet solution, to keep it out of the program initialisation - as that seems like a messy solution.
Edit: this is using qt designer, and qt 4.6.2. I cannot upgrade the qt version easily.
正しい解決策はありません