QTabWidget: style each tab differently
-
Hi everyone,
is it possible to style each tab of a QTabWidget differently (while using e.g. the tabindex) as the individual tabs are widgets?
The setStyleSheet option only styles the whole QTabBar apart from using different states (:only-one, :first, :last, :middle, :previous-selected, :next-selected, :selected) which won't work in my case.Thanks!!
-
@Sebbo
short answer: no.
Unfortunately that's not possible. -
@raven-worx
thanks for your answer.
Well that's disappointing. I'd like to change the appearance e.g. when an event is fired. Otherwise I wouldn't recognize any changes in the different widgets. Is there any other way to achieve that? Like jumping to the desired tab by using the index? -
@Sebbo said in QTabWidget: style each tab differently:
Like jumping to the desired tab by using the index?
QTabWidget::setCurrentIndex()
-
@raven-worx
ah right, couldn't be easier. :)
Maybe I'll come up with another solution for my issue like subclassing and repainting the tabbar. For now that'll do the trick.
Cheers