pub struct AlignmentFlag(/* private fields */);Expand description
This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.
C++ enum: Qt::AlignmentFlag.
This enum type is used to describe alignment. It contains horizontal and vertical flags that can be combined to produce the required effect.
The TextElideMode enum can also be used in many situations to fine-tune the appearance of aligned text.
The horizontal flags are:
The vertical flags are:
You can use only one of the horizontal flags at a time. There is one two-dimensional flag:
You can use at most one horizontal and one vertical flag at a time. Qt::AlignCenter counts as both horizontal and vertical.
Three enum values are useful in applications that can be run in right-to-left mode:
Masks:
Conflicting combinations of flags have undefined meanings.
The Alignment type is a typedef for QFlags<AlignmentFlag>. It stores an OR combination of AlignmentFlag values.
Implementations§
Source§impl AlignmentFlag
 
impl AlignmentFlag
Sourcepub const AlignLeft: AlignmentFlag
 
pub const AlignLeft: AlignmentFlag
Aligns with the left edge. (C++ enum variant: AlignLeft = 1)
Sourcepub const AlignLeading: AlignmentFlag
 
pub const AlignLeading: AlignmentFlag
Synonym for Qt::AlignLeft. (C++ enum variant: AlignLeading = 1)
Sourcepub const AlignRight: AlignmentFlag
 
pub const AlignRight: AlignmentFlag
Aligns with the right edge. (C++ enum variant: AlignRight = 2)
Sourcepub const AlignTrailing: AlignmentFlag
 
pub const AlignTrailing: AlignmentFlag
Synonym for Qt::AlignRight. (C++ enum variant: AlignTrailing = 2)
Sourcepub const AlignHCenter: AlignmentFlag
 
pub const AlignHCenter: AlignmentFlag
Centers horizontally in the available space. (C++ enum variant: AlignHCenter = 4)
Sourcepub const AlignJustify: AlignmentFlag
 
pub const AlignJustify: AlignmentFlag
Justifies the text in the available space. (C++ enum variant: AlignJustify = 8)
Sourcepub const AlignAbsolute: AlignmentFlag
 
pub const AlignAbsolute: AlignmentFlag
If the widget’s layout direction is Qt::RightToLeft (instead of Qt::LeftToRight, the default), Qt::AlignLeft refers to the right edge and Qt::AlignRight to the left edge. This is normally the desired behavior. If you want Qt::AlignLeft to always mean “left” and Qt::AlignRight to always mean “right”, combine the flag with Qt::AlignAbsolute. (C++ enum variant: AlignAbsolute = 16)
Sourcepub const AlignHorizontalMask: AlignmentFlag
 
pub const AlignHorizontalMask: AlignmentFlag
C++ enum variant: AlignHorizontal_Mask = 31
Sourcepub const AlignTop: AlignmentFlag
 
pub const AlignTop: AlignmentFlag
Aligns with the top. (C++ enum variant: AlignTop = 32)
Sourcepub const AlignBottom: AlignmentFlag
 
pub const AlignBottom: AlignmentFlag
Aligns with the bottom. (C++ enum variant: AlignBottom = 64)
Sourcepub const AlignVCenter: AlignmentFlag
 
pub const AlignVCenter: AlignmentFlag
Centers vertically in the available space. (C++ enum variant: AlignVCenter = 128)
Sourcepub const AlignBaseline: AlignmentFlag
 
pub const AlignBaseline: AlignmentFlag
Aligns with the baseline. (C++ enum variant: AlignBaseline = 256)
Sourcepub const AlignVerticalMask: AlignmentFlag
 
pub const AlignVerticalMask: AlignmentFlag
C++ enum variant: AlignVertical_Mask = 480
Sourcepub const AlignCenter: AlignmentFlag
 
pub const AlignCenter: AlignmentFlag
Centers in both dimensions. (C++ enum variant: AlignCenter = 132)
Trait Implementations§
Source§impl<T: Into<QFlags<AlignmentFlag>>> BitOr<T> for AlignmentFlag
 
impl<T: Into<QFlags<AlignmentFlag>>> BitOr<T> for AlignmentFlag
Source§impl Clone for AlignmentFlag
 
impl Clone for AlignmentFlag
Source§fn clone(&self) -> AlignmentFlag
 
fn clone(&self) -> AlignmentFlag
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more