# class KSqueezedTextLabel

###

Module | kdeui
Namespace |
Class | KSqueezedTextLabel
Inherits | QLabel

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

Author Ronny Standtke <Ronny.Standtke@gmx.de>

### methods

- KSqueezedTextLabel (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  Default constructor.

- KSqueezedTextLabel (text, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  text | QString |
  parent | QWidget | 0

- KSqueezedTextLabel (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0

- KSqueezedTextLabel (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString |
  a1 | QWidget | 0

- contextMenuEvent (a0)

  returns Nothing
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | QContextMenuEvent |

  \reimp

- minimumSizeHint ( )

  returns QSize

- resizeEvent (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | QResizeEvent |

  Called when widget is resized

- setAlignment (a0)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | Qt.Alignment |

  Overridden for internal reasons; the API remains unaffected.

- setText (text)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  text | QString |

  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

      KSqueezedTextLabel* squeezed = new KSqueezedTextLabel("text", parent);
      QLabel* label = squeezed;
      label->setText("new text");	// this will not work
      squeezed->setText("new text");	// works as expected
      static_cast<KSqueezedTextLabel*>(label)->setText("new text");	// works as expected

  mode - The new text.

- setTextElideMode (mode)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  mode | Qt.TextElideMode |

  Sets the text elide mode.

  mode - The text elide mode.

- sizeHint ( )

  returns QSize

- squeezeTextToLabel ( )

  returns Nothing

  does the dirty work

- textElideMode ( )

  returns Qt.TextElideMode

  Returns the text elide mode.