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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Friends

# QFontMetrics Class Reference

Search for all occurrences

## Detailed Description

Definition at line 65 of file qfontmetrics.h.

`#include <qfontmetrics.h>`

List of all members.

## Public Member Functions
| QFontMetrics (const QFont &)
| QFontMetrics (const QFont &, QPaintDevice *pd)
| QFontMetrics (const QFontMetrics &)
| ~QFontMetrics ()
QFontMetrics & | operator= (const QFontMetrics &)
int | ascent () const
int | descent () const
int | height () const
int | leading () const
int | lineSpacing () const
int | minLeftBearing () const
int | minRightBearing () const
int | maxWidth () const
int | xHeight () const
int | averageCharWidth () const
bool | inFont (QChar) const
int | leftBearing (QChar) const
int | rightBearing (QChar) const
int | width (const QString &, int len=-1) const
int | width (const QString &, int len, int flags) const
int | width (QChar) const
int | charWidth (const QString &str, int pos) const
QRect | boundingRect (QChar) const
QRect | boundingRect (const QString &text) const
QRect | boundingRect (const QRect &r, int flags, const QString &text, int tabstops=0, int *tabarray=0) const
QRect | boundingRect (int x, int y, int w, int h, int flags, const QString &text, int tabstops=0, int *tabarray=0) const
QSize | size (int flags, const QString &str, int tabstops=0, int *tabarray=0) const
QRect | tightBoundingRect (const QString &text) const
QString | elidedText (const QString &text, Qt::TextElideMode mode, int width, int flags=0) const
int | underlinePos () const
int | overlinePos () const
int | strikeOutPos () const
int | lineWidth () const
bool | operator== (const QFontMetrics &other)
bool | operator== (const QFontMetrics &other) const
bool | operator!= (const QFontMetrics &other)
bool | operator!= (const QFontMetrics &other) const
## Friends
class | QFontMetricsF
class | QStackTextEngine

## Constructor & Destructor Documentation

QFontMetrics | ( | const QFont & |  | ) |

QFontMetrics | ( | const QFont & | ,
|  | QPaintDevice * | pd
| ) |  |

QFontMetrics | ( | const QFontMetrics & |  | ) |

~QFontMetrics | ( |  | ) |

## Member Function Documentation

QFontMetrics& operator= | ( | const QFontMetrics & |  | ) |

int ascent | ( |  | ) | const

Search for all occurrences

int descent | ( |  | ) | const

Search for all occurrences

int height | ( |  | ) | const

Search for all occurrences

int leading | ( |  | ) | const

Search for all occurrences

int lineSpacing | ( |  | ) | const

Search for all occurrences

int minLeftBearing | ( |  | ) | const

Search for all occurrences

int minRightBearing | ( |  | ) | const

Search for all occurrences

int maxWidth | ( |  | ) | const

Search for all occurrences

int xHeight | ( |  | ) | const

Search for all occurrences

int averageCharWidth | ( |  | ) | const

Search for all occurrences

bool inFont | ( | QChar |  | ) | const

Search for all occurrences

int leftBearing | ( | QChar |  | ) | const

Search for all occurrences

int rightBearing | ( | QChar |  | ) | const

Search for all occurrences

int width | ( | const QString & | ,
|  | int | len = `-1`
| ) |  | const

Search for all occurrences

int width | ( | const QString & | ,
|  | int | len,
|  | int | flags
| ) |  | const

Search for all occurrences

int width | ( | QChar |  | ) | const

Search for all occurrences

int charWidth | ( | const QString & | str,
|  | int | pos
| ) |  | const

Search for all occurrences

QRect boundingRect | ( | QChar |  | ) | const

Search for all occurrences

QRect boundingRect | ( | const QString & | text | ) | const

Search for all occurrences

QRect boundingRect | ( | const QRect & | r,
|  | int | flags,
|  | const QString & | text,
|  | int | tabstops = `0`,
|  | int * | tabarray = `0`
| ) |  | const

Search for all occurrences

QRect boundingRect | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | int | flags,
|  | const QString & | text,
|  | int | tabstops = `0`,
|  | int * | tabarray = `0`
| ) |  | const `[inline]`

Search for all occurrences

Definition at line 101 of file qfontmetrics.h.

            { return boundingRect(QRect(x, y, w, h), flags, text, tabstops, tabarray); }

QSize size | ( | int | flags,
|  | const QString & | str,
|  | int | tabstops = `0`,
|  | int * | tabarray = `0`
| ) |  | const

Search for all occurrences

QRect tightBoundingRect | ( | const QString & | text | ) | const

Search for all occurrences

QString elidedText | ( | const QString & | text,
|  | Qt::TextElideMode | mode,
|  | int | width,
|  | int | flags = `0`
| ) |  | const

Search for all occurrences

int underlinePos | ( |  | ) | const

Search for all occurrences

int overlinePos | ( |  | ) | const

Search for all occurrences

int strikeOutPos | ( |  | ) | const

Search for all occurrences

int lineWidth | ( |  | ) | const

Search for all occurrences

bool operator== | ( | const QFontMetrics & | other | ) |

bool operator== | ( | const QFontMetrics & | other | ) | const

bool operator!= | ( | const QFontMetrics & | other | ) | `[inline]`

Definition at line 117 of file qfontmetrics.h.

    { return !operator==(other); } // 5.0 - remove me

bool operator!= | ( | const QFontMetrics & | other | ) | const `[inline]`

Definition at line 118 of file qfontmetrics.h.

    { return !operator==(other); }

## Friends And Related Function Documentation

friend class QFontMetricsF `[friend]`

Search for all occurrences

Definition at line 133 of file qfontmetrics.h.

friend class QStackTextEngine `[friend]`

Search for all occurrences

Definition at line 134 of file qfontmetrics.h.

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

- QtGui/qfontmetrics.h

QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics
QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics QFontMetrics