I currently have a QTabWidget that looks like this.The QtabWidget has a QtableView inside it
I wanted to know how I could change the background color of the QtabWidget. I want to maintain my existing stylesheet for the QtabWidget and only add the blue background in the area marked by the red arrows. In short i want to add a background color under the tabs. I currently have a stylesheet that looks like this
QTAB
QTabWidget
{
/* min-width:5000em;*/
}
QTabWidget::tab-bar
{
left: 5px; /* move to the right by 5px */
}
QTabWidget::pane
{
border-top: 1px solid gray;
border-left: 1px solid gray;
border-right: 1px solid gray;
border-bottom: 1px solid gray;
}
QTabBar::tab
{
background-color: rgb(166, 166, 166);
min-width: 70px;
padding-top : 6px;
padding-bottom : 8px;
color: rgb(255, 255, 255);
font: 10pt "Arial";
}
QTabBar::tab:selected, QTabBar::tab:hover
{
background-color: rgb(127, 127, 127);
}
QTabBar::tab:selected
{
/*border-color: #9B9B9B;*/
}
QTabBar::tab:!selected
{
margin-top: 2px; /* make non-selected tabs look smaller */
}
Any suggestions on how I could add a background color under a tab would be appreciated. Thanks.