Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QTabWidget set title font of only one tab

I've created a chat program with an Interface using QTabWidget. If there's an update in a tab i want to set the tabs title font to a bold font. With QTabWidget::font i can only set the font of the titles of all tabs.

like image 346
Florian Avatar asked Mar 12 '11 11:03

Florian


1 Answers

Unfortunately, you can only access the text itself. The font of the text is not exposed in the QTabBar of the QTabWidget. Perhaps changing the color of the tab would suffice? Otherwise, you'd have to override the painting algorithms, which probably would prove to be cumbersome. In Qt 3 it was possible accessing the QTab with tabAt(int index) but, unfortunately, they removed that.

like image 199
Morten Kristensen Avatar answered Sep 30 '22 07:09

Morten Kristensen