QxtLabel Class Reference
[Gui]
A simplified label which is able to show elided and rotated text.
More...
Public Slots
-
void setText (const QString &text)
Signals
- void clicked ()
-
void textChanged (const QString &text)
Public Member Functions
- QxtLabel (QWidget *parent=0, Qt::WindowFlags flags=0)
- QxtLabel (const QString &text, QWidget *parent=0, Qt::WindowFlags flags=0)
- virtual ~QxtLabel ()
-
QString text () const
-
Qt::Alignment alignment () const
-
void setAlignment (Qt::Alignment alignment)
-
Qt::TextElideMode elideMode () const
-
void setElideMode (Qt::TextElideMode mode)
-
Qxt::Rotation rotation () const
-
void setRotation (Qxt::Rotation rotation)
Properties
-
QString text
- This property holds the text of the label.
- Qt::Alignment alignment
- This property holds the alignment of the text.
- Qt::TextElideMode elideMode
- This property holds the elide mode of the text.
- Qxt::Rotation rotation
- This property holds the rotation of the label.
Detailed Description
A simplified label which is able to show elided and rotated text.
QxtLabel is a simple label widget able to show elided and rotated plain text. In addition, QxtLabel provides a signal for clicking.
QxtLabel in action.
- Note:
- Requires Qt 4.2 or newer.
Constructor & Destructor Documentation
QxtLabel::QxtLabel
( QWidget *
parent = 0,
Qt::WindowFlags
flags = 0
) [explicit]
Constructs a new QxtLabel with parent and flags.
QxtLabel::QxtLabel
( const QString &
text,
QWidget *
parent = 0,
Qt::WindowFlags
flags = 0
)
Constructs a new QxtLabel with text, parent and flags.
QxtLabel::~QxtLabel
(
) [virtual]
Member Function Documentation
QxtLabel::clicked
(
) [signal]
This signal is emitted whenever the label has been clicked.
Property Documentation
Qt::Alignment QxtLabel::alignment [read, write]
This property holds the alignment of the text.
The text is aligned according to this property. The default value is Qt::AlignCenter.
- See also:
- text
Qt::TextElideMode QxtLabel::elideMode [read, write]
This property holds the elide mode of the text.
The text is elided according to this property. The default value is Qt::ElideMiddle.
- See also:
- text
This property holds the rotation of the label.
The label is rotated according to this property. The default value is Qxt::NoRotation.
- See also:
- Qxt::Rotation