Customize QTabBar or QTabWidget
Dear everybody out there,
I have developed my program based on QT 4.0.0 and have a requirement to set different color for each tab page title (or text in QT language). Does anyone have experience with QTabBar and QTabWidget ? If someone knows (as I hope) please do me a favour.
Greatly appreciated all your helps. Thanks in advance
Have a nice day
Ps: it's nice of you to give me some sample code snippet.
Re: Customize QTabBar or QTabWidget
QTabBar has a method setTabTextColor
With QTabWidget, I think you would have to inherit a QTabWidget, and that way you would have access to the protected method QTabBar * tabBar () const. And then you can use the above function to change the text color for each tab.
Bojan
Re: Customize QTabBar or QTabWidget
Thank you Bojan
Your answer is good, but unfortunately the Qt version 4.0.0 I am using doesn't have any method which is so-called setTabTextColor even with QTabBar class. Thanks anyway
Regards
ps: If you find some way with Qt version 4.0.0 pls reply to me.
Urgence: Customize QTabBar or QTabWidget
Hi everybody
Could any body set the color for each tab in different color for QTabWidget object in Qt 4.0.0.
Thanks in advance