Dear all,
I want to highlight a character of the text of the QTabWidget,for example, the tabText is "Display Tab" , and I want to change it to "Diaplay Tab *" , but how to do it ?
Thanks!
Dear all,
I want to highlight a character of the text of the QTabWidget,for example, the tabText is "Display Tab" , and I want to change it to "Diaplay Tab *" , but how to do it ?
Thanks!
There is no straightforward way to do that. You'd have to subclass QTabBar, reimplement tab drawing routines and then subclass QTabWidget and use your new TabBar.
Am not sure if it will work...but you can try using rich text while setting the tab text..
something like -
setTabText(index,"Display Tab <red> *</red>");
Dear ,
Thanks for your advice.
Wysota's idea should meet my request, but my Qt's version is 4.3, so some function like "setTabButton() ..." can not support.
I will try aamer4yu's idea. Thanks again.
I was not talking about setTabButton. I was talking about QTabWidget::setTabBar(). Rich text doesn't work on tabs so you can safely skip trying it.
Dear wysota,
According to your advice, I have done it, thanks for your support
Bookmarks