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

- Class List
- Class Hierarchy
- Class Members

Public Types | Signals | Public Member Functions | Protected Member Functions | Friends

# QGraphicsTextItem Class Reference

Search for all occurrences

## Detailed Description

Definition at line 959 of file qgraphicsitem.h.

`#include <qgraphicsitem.h>`

Inheritance diagram for QGraphicsTextItem:
[legend]

List of all members.

## Public Types
enum | { Type = 8 }
## Signals
void | linkActivated (const QString &)
void | linkHovered (const QString &)
## Public Member Functions
| QGraphicsTextItem (QGraphicsItem *parent=0, QGraphicsScene *scene=0)
| QGraphicsTextItem (const QString &text, QGraphicsItem *parent=0, QGraphicsScene *scene=0)
| ~QGraphicsTextItem ()
QString | toHtml () const
void | setHtml (const QString &html)
QString | toPlainText () const
void | setPlainText (const QString &text)
QFont | font () const
void | setFont (const QFont &font)
void | setDefaultTextColor (const QColor &c)
QColor | defaultTextColor () const
QRectF | boundingRect () const
QPainterPath | shape () const
bool | contains (const QPointF &point) const
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
bool | isObscuredBy (const QGraphicsItem *item) const
QPainterPath | opaqueArea () const
int | type () const
void | setTextWidth (qreal width)
qreal | textWidth () const
void | adjustSize ()
void | setDocument (QTextDocument *document)
QTextDocument * | document () const
void | setTextInteractionFlags (Qt::TextInteractionFlags flags)
Qt::TextInteractionFlags | textInteractionFlags () const
void | setTabChangesFocus (bool b)
bool | tabChangesFocus () const
void | setOpenExternalLinks (bool open)
bool | openExternalLinks () const
void | setTextCursor (const QTextCursor &cursor)
QTextCursor | textCursor () const
## Protected Member Functions
bool | sceneEvent (QEvent *event)
void | mousePressEvent (QGraphicsSceneMouseEvent *event)
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event)
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
void | keyPressEvent (QKeyEvent *event)
void | keyReleaseEvent (QKeyEvent *event)
void | focusInEvent (QFocusEvent *event)
void | focusOutEvent (QFocusEvent *event)
void | dragEnterEvent (QGraphicsSceneDragDropEvent *event)
void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
void | dragMoveEvent (QGraphicsSceneDragDropEvent *event)
void | dropEvent (QGraphicsSceneDragDropEvent *event)
void | inputMethodEvent (QInputMethodEvent *event)
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event)
void | hoverMoveEvent (QGraphicsSceneHoverEvent *event)
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
QVariant | inputMethodQuery (Qt::InputMethodQuery query) const
bool | supportsExtension (Extension extension) const
void | setExtension (Extension extension, const QVariant &variant)
QVariant | extension (const QVariant &variant) const
## Friends
class | QGraphicsTextItemPrivate

## Member Enumeration Documentation

anonymous enum

Search for all occurrences

Enumerator:

  Type | Search for all occurrences

Definition at line 1001 of file qgraphicsitem.h.

    { Type = 8 };

## Constructor & Destructor Documentation

QGraphicsTextItem | ( | QGraphicsItem * | parent = `0`,
|  | QGraphicsScene * | scene = `0`
| ) |  |

QGraphicsTextItem | ( | const QString & | text,
|  | QGraphicsItem * | parent = `0`,
|  | QGraphicsScene * | scene = `0`
| ) |  |

~QGraphicsTextItem | ( |  | ) |

## Member Function Documentation

QString toHtml | ( |  | ) | const

Search for all occurrences

void setHtml | ( | const QString & | html | ) |

Search for all occurrences

QString toPlainText | ( |  | ) | const

Search for all occurrences

void setPlainText | ( | const QString & | text | ) |

Search for all occurrences

QFont font | ( |  | ) | const

Search for all occurrences

void setFont | ( | const QFont & | font | ) |

Search for all occurrences

void setDefaultTextColor | ( | const QColor & | c | ) |

Search for all occurrences

QColor defaultTextColor | ( |  | ) | const

Search for all occurrences

QRectF boundingRect | ( |  | ) | const `[virtual]`

Search for all occurrences

Implements QGraphicsItem.

QPainterPath shape | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

bool contains | ( | const QPointF & | point | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void paint | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget
| ) |  | `[virtual]`

Search for all occurrences

Implements QGraphicsItem.

bool isObscuredBy | ( | const QGraphicsItem * | item | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

QPainterPath opaqueArea | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

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

Search for all occurrences

Reimplemented from QGraphicsItem.

void setTextWidth | ( | qreal | width | ) |

Search for all occurrences

qreal textWidth | ( |  | ) | const

Search for all occurrences

void adjustSize | ( |  | ) |

Search for all occurrences

void setDocument | ( | QTextDocument * | document | ) |

Search for all occurrences

QTextDocument* document | ( |  | ) | const

Search for all occurrences

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

Search for all occurrences

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

Search for all occurrences

void setTabChangesFocus | ( | bool | b | ) |

Search for all occurrences

bool tabChangesFocus | ( |  | ) | const

Search for all occurrences

void setOpenExternalLinks | ( | bool | open | ) |

Search for all occurrences

bool openExternalLinks | ( |  | ) | const

Search for all occurrences

void setTextCursor | ( | const QTextCursor & | cursor | ) |

Search for all occurrences

QTextCursor textCursor | ( |  | ) | const

Search for all occurrences

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

Search for all occurrences

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

Search for all occurrences

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

Search for all occurrences

Reimplemented from QGraphicsItem.

void mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void mouseDoubleClickEvent | ( | QGraphicsSceneMouseEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

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

Search for all occurrences

Reimplemented from QGraphicsItem.

void keyReleaseEvent | ( | QKeyEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

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

Search for all occurrences

Reimplemented from QGraphicsItem.

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

Search for all occurrences

Reimplemented from QGraphicsItem.

void dragEnterEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void dragLeaveEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void dragMoveEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void dropEvent | ( | QGraphicsSceneDragDropEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void inputMethodEvent | ( | QInputMethodEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void hoverMoveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

QVariant inputMethodQuery | ( | Qt::InputMethodQuery | query | ) | const `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

bool supportsExtension | ( | Extension | extension | ) | const `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

void setExtension | ( | Extension | extension,
|  | const QVariant & | variant
| ) |  | `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

QVariant extension | ( | const QVariant & | variant | ) | const `[protected, virtual]`

Search for all occurrences

Reimplemented from QGraphicsItem.

## Friends And Related Function Documentation

friend class QGraphicsTextItemPrivate `[friend]`

Search for all occurrences

Definition at line 1060 of file qgraphicsitem.h.

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

- QtGui/qgraphicsitem.h

QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem
QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem QGraphicsTextItem