MistyD
MistyD

Reputation: 17223

Qt: Align Text Center and Left using StyleSheet

I want to align the text in a QLabel in such a way that horizontal alignment is left and vertical alignment is center with word-wrap. Currently I am doing something like this

QLabel
{
    qproperty-alignment: AlignLeft;
}

I want to know how I can set text vertical and horizontal alignment individually.

Upvotes: 11

Views: 20754

Answers (1)

Predelnik
Predelnik

Reputation: 5246

Most likely you should write something like:

 qproperty-alignment: 'AlignVCenter | AlignLeft';
 qproperty-wordWrap: true;

Upvotes: 14

Related Questions