#include <ksqueezedtextlabel.h>
A replacement for QLabel that squeezes its text.
A label class that squeezes its text into the label
If the text is too long to fit into the label it is divided into remaining left and right parts which are separated by three dots.
Example: http://www.kde.org/documentation/index.html could be squeezed to http://www.kde...ion/index.html
KSqueezedTextLabel Widget
- Author
- Ronny Standtke Ronny.nosp@m..Sta.nosp@m.ndtke.nosp@m.@gmx.nosp@m..de
Definition at line 47 of file ksqueezedtextlabel.h.
◆ KSqueezedTextLabel() [1/2]
KSqueezedTextLabel::KSqueezedTextLabel |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
◆ KSqueezedTextLabel() [2/2]
KSqueezedTextLabel::KSqueezedTextLabel |
( |
const QString & |
text, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
explicit |
◆ ~KSqueezedTextLabel()
KSqueezedTextLabel::~KSqueezedTextLabel |
( |
| ) |
|
|
virtual |
◆ clear
void KSqueezedTextLabel::clear |
( |
| ) |
|
|
slot |
◆ contextMenuEvent()
void KSqueezedTextLabel::contextMenuEvent |
( |
QContextMenuEvent * |
ev | ) |
|
|
protected |
◆ fullText()
QString KSqueezedTextLabel::fullText |
( |
| ) |
const |
◆ minimumSizeHint()
QSize KSqueezedTextLabel::minimumSizeHint |
( |
| ) |
const |
|
virtual |
◆ mouseReleaseEvent()
void KSqueezedTextLabel::mouseReleaseEvent |
( |
QMouseEvent * |
ev | ) |
|
|
protected |
◆ resizeEvent()
void KSqueezedTextLabel::resizeEvent |
( |
QResizeEvent * |
| ) |
|
|
protected |
◆ setAlignment()
void KSqueezedTextLabel::setAlignment |
( |
Qt::Alignment |
alignment | ) |
|
|
virtual |
◆ setText
void KSqueezedTextLabel::setText |
( |
const QString & |
text | ) |
|
|
slot |
Sets the text.
Note that this is not technically a reimplementation of QLabel::setText(), which is not virtual (in Qt 4.3). Therefore, you may need to cast the object to KSqueezedTextLabel in some situations: \Example
label->setText("new text");
A replacement for QLabel that squeezes its text.
void setText(const QString &text)
Sets the text.
- Parameters
-
Definition at line 89 of file ksqueezedtextlabel.cpp.
◆ setTextElideMode()
void KSqueezedTextLabel::setTextElideMode |
( |
Qt::TextElideMode |
mode | ) |
|
◆ sizeHint()
QSize KSqueezedTextLabel::sizeHint |
( |
| ) |
const |
|
virtual |
◆ squeezeTextToLabel()
void KSqueezedTextLabel::squeezeTextToLabel |
( |
| ) |
|
|
protected |
◆ textElideMode()
Qt::TextElideMode KSqueezedTextLabel::textElideMode |
( |
| ) |
const |
◆ textElideMode
Qt::TextElideMode KSqueezedTextLabel::textElideMode |
|
readwrite |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by
doxygen 1.9.6 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.