Qt::AlignmentFlags
This enum type is used to describe alignment. It contains four sets of flags: Horizontal, vertical and modifying flags. The horizontal flags are:
AlignLeft - Align with the left edge.
AlignRight - Align with the right edge.
AlignHCenter - Center horizontally in the available space.
The vertical flags are:
AlignTop - Align with the top.
AlignBottom - Align with the bottom.
AlignVCenter - Center vertically in the available space.
You can only use one of the horizontal flags at a time. There is one two-dimensional flag:
AlignCenter - Center in both dimensions.
This counts both as a horizontal and vertical flag: It cannot be combined with any other horizontal or vertical flags.
There are also some modifier flags. All of them apply only to printing:
SingleLine - Treat all white-space as space and print just one line.
DontClip - If it's impossible to stay within the given bounds, print outside.
ExpandTabs - Make the U+0009 (ascii tab) character move to the next tab stop.
ShowPrefix - Display the string "&P" as an underlined P (see QButton for an example). To get an ampersand, use "&&".
WordBreak - Do line breaking at at appropriate points.
You can only use one of the horizontal flags at a time, and one of the vertical flags. AlignCenter counts as both horizontal and vertical. You can use as many modifier flags as you want, except that SingleLine and WordBreak cannot be combined.