I created a chat program with an interface using QTabWidget. If there is an update on the tab, I want to set the tab header font to bold. With QTabWidget :: font, I can only set the font of the headers of all .
QTabWidget
Unfortunately, you can only access the text itself. The font of the text does not appear in QTabBar QTabWidget . Perhaps changing the color of the tab would be enough? Otherwise, you will have to redefine the drawing algorithms, which is likely to be cumbersome. In Qt 3, one could access QTabc tabAt(int index), but unfortunately they removed it.
QTab
tabAt(int index)
You can use the QTabBar :: setTabTextColor () method, for example:
QTabBar* bar=tagWidget->tabBar(); bar->setTabTextColor(index, Qt::blue);
Qt, , . - :
yourTabWidget.currentWidget()->setFont(/*bold font*/);