PDA

View Full Version : Set stylesheet of a specific QTabWidget



hass26
27th February 2015, 01:57
As per documentation, I can set the "tab" stylesheet of all QTabWidgets using QTabBar::tab, but this propagates to all other tabwidgets.

Can I set the style of a specific tab without reimplementing QtabWidget? something like QTabWidget#mytab?

d_stranz
27th February 2015, 16:14
Are you talking about the style for the tabs themselves or for the page widgets that are managed by the QTabWidget? For the tabs themselves, you can set color, text, and other properties on individual tabs through the QTabBar instance for the QTabWidget.

I do not know if QTabBar::setText() supports Rich Text Format, but if it does, you may be able to further control the appearance that way.