I need to change background color for the empty space of the QTabbar like in image below, I can already use style sheet to change tabbar but it change tabs only not the empty space next to tabs (red bordered area)
3
votes
1 Answers
4
votes
As far as I know you can make it either via:
tabWidget->setStyleSheet("QTabBar { background-color: red; }");
tabWidget->setDocumentMode(true);
But it doesn't look good.
Or via:
tabWidget->setAutoFillBackground(true);
QPalette pal = tabWidget->palette();
pal.setColor(QPalette::Window, Qt::red);
tabWidget->setPalette(pal);
Or just create QWidget with some background and insert QTabWidget on top of it.