PDA

View Full Version : QTabBar styling



miso
8th July 2013, 15:40
Hi folks!
I'd like to style each page button on QTabBar identified by custom property (or index).
Is it even possible? The problem is that custom (page) property is associated with pane, not tab bar.
I'm looking for something like
QTabBar::tab[currentIndex=0] { background: yellow; }

But this doesn't work. What I found in documentation (http://qt-project.org/doc/qt-4.8/stylesheet-examples.html) is identifying first, last, selected and hoved.

sonulohani
9th July 2013, 08:40
Use different stylesheet for each tab bar.

miso
9th July 2013, 09:20
Thanks for your answer ... but I don't understand how to do it. I have a simple hierarchy QDialog->QTabWidget->[QWidget, QWidget]
Could you possibly provide me some short example? Thanks