标签:
see the code after subclassing
TabWidget::TabWidget(QWidget *parent): QTabWidget(parent),mousePressFlag(false)
{
bar=tabBar();
QPalette palette;
bar->installEventFilter(this);
palette.setColor(QPalette::Active,QPalette::Button ,QColor(0,0,255));
bar->setPalette(palette);
bar->setAutoFillBackground(true);
};
tabWidget->setPalette(QPalette(Qt::red));
http://www.qtcentre.org/threads/2986-How-to-change-color-of-Tab-in-QTabWidget
QTabWidget and QTabBar.的文字的颜色设置,三种方法
标签:
原文地址:http://www.cnblogs.com/findumars/p/5689990.html