- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends

# QLabel Class Reference

Search for all occurrences

## Detailed Description

Definition at line 55 of file qlabel.h.

`#include <qlabel.h>`

Inheritance diagram for QLabel:
[legend]

List of all members.

## Public Slots
void | setText (const QString &)
void | setPixmap (const QPixmap &)
void | setPicture (const QPicture &)
void | setMovie (QMovie *movie)
void | setNum (int)
void | setNum (double)
void | clear ()
## Signals
void | linkActivated (const QString &link)
void | linkHovered (const QString &link)
## Public Member Functions
| QLabel (QWidget *parent=0, Qt::WindowFlags f=0)
| QLabel (const QString &text, QWidget *parent=0, Qt::WindowFlags f=0)
| ~QLabel ()
QString | text () const
const QPixmap * | pixmap () const
const QPicture * | picture () const
QMovie * | movie () const
Qt::TextFormat | textFormat () const
void | setTextFormat (Qt::TextFormat)
Qt::Alignment | alignment () const
void | setAlignment (Qt::Alignment)
void | setWordWrap (bool on)
bool | wordWrap () const
int | indent () const
void | setIndent (int)
int | margin () const
void | setMargin (int)
bool | hasScaledContents () const
void | setScaledContents (bool)
QSize | sizeHint () const
QSize | minimumSizeHint () const
void | setBuddy (QWidget *)
QWidget * | buddy () const
int | heightForWidth (int) const
bool | openExternalLinks () const
void | setOpenExternalLinks (bool open)
void | setTextInteractionFlags (Qt::TextInteractionFlags flags)
Qt::TextInteractionFlags | textInteractionFlags () const
void | setSelection (int, int)
bool | hasSelectedText () const
QString | selectedText () const
int | selectionStart () const
## Protected Member Functions
bool | event (QEvent *e)
void | keyPressEvent (QKeyEvent *ev)
void | paintEvent (QPaintEvent *)
void | changeEvent (QEvent *)
void | mousePressEvent (QMouseEvent *ev)
void | mouseMoveEvent (QMouseEvent *ev)
void | mouseReleaseEvent (QMouseEvent *ev)
void | contextMenuEvent (QContextMenuEvent *ev)
void | focusInEvent (QFocusEvent *ev)
void | focusOutEvent (QFocusEvent *ev)
bool | focusNextPrevChild (bool next)
## Properties
QString | text
Qt::TextFormat | textFormat
QPixmap | pixmap
bool | scaledContents
Qt::Alignment | alignment
bool | wordWrap
int | margin
int | indent
bool | openExternalLinks
Qt::TextInteractionFlags | textInteractionFlags
bool | hasSelectedText
QString | selectedText
## Friends
class | QMessageBoxPrivate
class | QBalloonTip

## Constructor & Destructor Documentation

QLabel | ( | QWidget * | parent = `0`,
|  | Qt::WindowFlags | f = `0`
| ) |  | `[explicit]`

QLabel | ( | const QString & | text,
|  | QWidget * | parent = `0`,
|  | Qt::WindowFlags | f = `0`
| ) |  | `[explicit]`

~QLabel | ( |  | ) |

## Member Function Documentation

QString text | ( |  | ) | const

Search for all occurrences

const QPixmap* pixmap | ( |  | ) | const

Search for all occurrences

const QPicture* picture | ( |  | ) | const

Search for all occurrences

QMovie* movie | ( |  | ) | const

Search for all occurrences

Qt::TextFormat textFormat | ( |  | ) | const

Search for all occurrences

void setTextFormat | ( | Qt::TextFormat |  | ) |

Search for all occurrences

Qt::Alignment alignment | ( |  | ) | const

Search for all occurrences

void setAlignment | ( | Qt::Alignment |  | ) |

Search for all occurrences

void setWordWrap | ( | bool | on | ) |

Search for all occurrences

bool wordWrap | ( |  | ) | const

Search for all occurrences

int indent | ( |  | ) | const

Search for all occurrences

void setIndent | ( | int |  | ) |

Search for all occurrences

int margin | ( |  | ) | const

Search for all occurrences

void setMargin | ( | int |  | ) |

Search for all occurrences

bool hasScaledContents | ( |  | ) | const

Search for all occurrences

void setScaledContents | ( | bool |  | ) |

Search for all occurrences

QSize sizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QFrame.

QSize minimumSizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

void setBuddy | ( | QWidget * |  | ) |

Search for all occurrences

QWidget* buddy | ( |  | ) | const

Search for all occurrences

int heightForWidth | ( | int |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

bool openExternalLinks | ( |  | ) | const

Search for all occurrences

void setOpenExternalLinks | ( | bool | open | ) |

Search for all occurrences

void setTextInteractionFlags | ( | Qt::TextInteractionFlags | flags | ) |

Search for all occurrences

Qt::TextInteractionFlags textInteractionFlags | ( |  | ) | const

Search for all occurrences

void setSelection | ( | int | ,
|  | int |
| ) |  |

Search for all occurrences

bool hasSelectedText | ( |  | ) | const

Search for all occurrences

QString selectedText | ( |  | ) | const

Search for all occurrences

int selectionStart | ( |  | ) | const

Search for all occurrences

void setText | ( | const QString & |  | ) | `[slot]`

Search for all occurrences

void setPixmap | ( | const QPixmap & |  | ) | `[slot]`

Search for all occurrences

void setPicture | ( | const QPicture & |  | ) | `[slot]`

Search for all occurrences

void setMovie | ( | QMovie * | movie | ) | `[slot]`

Search for all occurrences

void setNum | ( | int |  | ) | `[slot]`

Search for all occurrences

void setNum | ( | double |  | ) | `[slot]`

Search for all occurrences

void clear | ( |  | ) | `[slot]`

Search for all occurrences

void linkActivated | ( | const QString & | link | ) | `[signal]`

Search for all occurrences

void linkHovered | ( | const QString & | link | ) | `[signal]`

Search for all occurrences

bool event | ( | QEvent * | e | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QFrame.

void keyPressEvent | ( | QKeyEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void paintEvent | ( | QPaintEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QFrame.

void changeEvent | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QFrame.

void mousePressEvent | ( | QMouseEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseMoveEvent | ( | QMouseEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseReleaseEvent | ( | QMouseEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void contextMenuEvent | ( | QContextMenuEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void focusInEvent | ( | QFocusEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void focusOutEvent | ( | QFocusEvent * | ev | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

bool focusNextPrevChild | ( | bool | next | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

## Friends And Related Function Documentation

friend class QMessageBoxPrivate `[friend]`

Search for all occurrences

Definition at line 174 of file qlabel.h.

friend class QBalloonTip `[friend]`

Search for all occurrences

Definition at line 175 of file qlabel.h.

## Property Documentation

QString text `[read, write]`

Search for all occurrences

Definition at line 58 of file qlabel.h.

Qt::TextFormat textFormat `[read, write]`

Search for all occurrences

Definition at line 59 of file qlabel.h.

QPixmap pixmap `[read, write]`

Search for all occurrences

Definition at line 60 of file qlabel.h.

bool scaledContents `[read, write]`

Search for all occurrences

Definition at line 61 of file qlabel.h.

Qt::Alignment alignment `[read, write]`

Search for all occurrences

Definition at line 62 of file qlabel.h.

bool wordWrap `[read, write]`

Search for all occurrences

Definition at line 63 of file qlabel.h.

int margin `[read, write]`

Search for all occurrences

Definition at line 64 of file qlabel.h.

int indent `[read, write]`

Search for all occurrences

Definition at line 65 of file qlabel.h.

bool openExternalLinks `[read, write]`

Search for all occurrences

Definition at line 66 of file qlabel.h.

Qt::TextInteractionFlags textInteractionFlags `[read, write]`

Search for all occurrences

Definition at line 67 of file qlabel.h.

bool hasSelectedText `[read]`

Search for all occurrences

Definition at line 68 of file qlabel.h.

QString selectedText `[read]`

Search for all occurrences

Definition at line 69 of file qlabel.h.

The documentation for this class was generated from the following file:

- QtGui/qlabel.h

QLabel QLabel QLabel QLabel QLabel QLabel QLabel QLabel QLabel QLabel
QLabel QLabel QLabel QLabel QLabel QLabel QLabel QLabel QLabel QLabel