roxton
16th March 2015, 14:16
Hello!
I need to set backgrounds for my widgets. I use the global css-file and set it using qApp->setStyleSheet.
At css-file, I need to set separately colors for all widgets and QTabWidget::pane subcontol. So I write:
QWidget
{
background-color: blue;
color: white;
}
QTabWidget::pane{
border-top: 1px solid grey;
background-color: red;
}
The problem is - QWidget's style's background is preffered over QTabWidget::pane. If I comment out QWidget's background-color, the QTabWidget::pane background-color works fine and I see the red background. But if QWidget's background-color is set, the QTabWidget::pane will be the same as QWidget's background-color.
How to solve this problem?
I need to set backgrounds for my widgets. I use the global css-file and set it using qApp->setStyleSheet.
At css-file, I need to set separately colors for all widgets and QTabWidget::pane subcontol. So I write:
QWidget
{
background-color: blue;
color: white;
}
QTabWidget::pane{
border-top: 1px solid grey;
background-color: red;
}
The problem is - QWidget's style's background is preffered over QTabWidget::pane. If I comment out QWidget's background-color, the QTabWidget::pane background-color works fine and I see the red background. But if QWidget's background-color is set, the QTabWidget::pane will be the same as QWidget's background-color.
How to solve this problem?