PDA

View Full Version : background color of not selected tab



iridium
13th August 2009, 16:57
The following code in QTabBar::QTabBar seems to set the color of only the activated or selected tab, the other tabs seem to take the background color of the widget its contained in.

The not selected tabs seem to be paint themselves transparent and they take the color of the widget.

Is there anyway to set the color of the not selected tabs.
Thanks for ur help.

pal.setColor(QPalette::Disabled, QPalette::Base
, QColor(105, 105, 105));
//pal.setColor(QPalette::AlternateBase, QColor(93, 93, 93));
pal.setColor(QPalette::Normal, QPalette::Button, QColor(105,105,105));
pal.setColor(QPalette::Disabled, QPalette::Button, QColor(105, 105, 105));

pal.setColor(QPalette::WindowText, QColor(105, 105, 105));
pal.setColor(QPalette::ButtonText, QColor(105,105,105));
pal.setColor(QPalette::Base, QColor(105, 105, 105));
pal.setColor(QPalette::AlternateBase, QColor(105, 105, 105));
pal.setColor(QPalette::Text, Qt::white);
this->setAutoFillBackground(true);
this->setPalette(pal);