Changing QTabWidget header size
General and Desktop
4
Posts
2
Posters
4.1k
Views
1
Watching
-
wrote on 16 Jan 2014, 06:01 last edited by
Hello,
I would like to change the size of my tabs in my tabWidget. I read something like this:
@tabWidget->setStyleSheet(
"color:black;"
"QTabBar::tab { height: 5px; width: 200px; }"
);@
but that does not work. What am I doing wrong? -
Use the following
@tabWidget.setStyleSheet("QTabBar::tab { color:black; height: 50px; width: 100px; }");@ -
wrote on 18 Jan 2014, 22:59 last edited by
It works, thank you! Out of curiosity, why does "color:black" have to be inside the QTabBar::tab brackets?
Thanks!
-
If you put it breaks the stylesheet syntax. Hence you need to put the right CSS syntax.
1/4