Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
-
Debian 11 using Qt Creator 4.14.1 and the Qt libraries packaged with the distribution and LXQt 0.16.0.
Description
Hi, I'm trying to display a QTabBar where the tabs are right-aligned instead of the platform default (left).
I put the following in my mainwindow.cpp after the call to ui->setupUi():
ui
>tabBar>setExpanding(false);
ui>tabBar>setStyleSheet("QTabBar{alignment:right;}");
However, instead of aligning the tabs to the right, they are now centered. It turns out they are always centered when I apply a stylesheet with an alignment property, no matter if I set "alignment: left", "alignment: center" or "alignment: right".
Am I doing anything wrong or doesn't QTabBar properly support the alignment property?