PDA

View Full Version : QTabWidget align



AlexD
11th January 2010, 14:37
Hi
How to align the title in qtabwidget to the left.

wysota
11th January 2010, 17:34
Would you care to explain what you mean? The exact looks of the tab bar depend on the widget style you are using. The tab size tends to adjust to the contents so the title is always "left aligned" and "right aligned" and also "centered". Unless of course the style author decided otherwise.

AlexD
11th January 2010, 18:37
Use setStyleSheet

QString style = QString( "QTabBar::tab { height: 30px; width: 180 px;}" );
setStyleSheet( style );

Now it looks like:
http://img339.imageshack.us/img339/8530/57207840.png (http://www.imagehosting.com/)
be so
http://f.imagehost.org/0071/2_30.png (http://f.imagehost.org/view/0071/2_30)

wysota
11th January 2010, 19:25
Use a different widget style.

AlexD
11th January 2010, 19:59
Can control not regardless of widget styles?

wysota
11th January 2010, 20:06
Seems not.

Viper666
10th August 2012, 13:19
I have this problem too isn't other way how do it ??? for example StyleSheet???