I have Tabbar in my form, What I want is to differentiate Active and Inactive Tab with different color text in it. My code is as below. I don't understand what is missing in it, It always show QPalette::Active text color in all the tab
QPalette Palette;
QTabBar* pTabBar = tabBar();
pTabBar->setAutoFillBackground(false);
pTabBar->setDrawBase(true);
Palette.setColor(QPalette::Active, QPalette::Window, QColor(255, 255, 255));
Palette.setColor(QPalette::Active, QPalette::WindowText, QColor(117, 121, 124));
pTabBar->setPalette(Palette);
Palette.setColor(QPalette::Inactive, QPalette::Window, QColor(171, 175, 178));
Palette.setColor(QPalette::Inactive, QPalette::WindowText, QColor(64, 68, 71));
pTabBar->setPalette(Palette);