Change the text color tab page
Dear all,
I tried the following code snippet for changing the text color of tab page but it wouldn't
work as I hoped.
QString strText("<font color=#FF0000>some text</font>");
my_tab->setTabText(strText,0);
At runtime the page at position zero shows the strText but it doesn't parse the html tag.
I expect there are some other ways to change the text color of a tab page. If so, Can
anybody do me a favour ?
All helps will be greatly appreciated.
Thanks in advance
Have a nice day.
Re: Change the text color tab page
Try with void QTabBar::setTabTextColor ( int index, const QColor & color ).
Re: Change the text color tab page
Dear MarkoSan,
Thanks for your reply.
As a matter of fact, I am using Qt version 4.0.0 and QTabBar class doesn't have a method which is so-called setTabTextColor.
Thanks anyway
Have a nice day
Re: Change the text color tab page
well is it possible for you to move to QT 4.1? Because there you have that method available.
Re: Change the text color tab page
Well that or subclass QTabBar and override QTabBar::paintLabel()