QQuickTextDocument Class

The QQuickTextDocument class provides access to the QTextDocument of QQuickTextEdit. 更多...

頭: #include <QQuickTextDocument>
qmake: QT += quick
Since: Qt 5.1
繼承: QObject

該類在 Qt 5.1 引入。

公共函數

QQuickTextDocument (QQuickItem * parent )
QTextDocument * textDocument () const

詳細描述

This class provides access to the QTextDocument of QQuickTextEdit elements. This is provided to allow usage of the 富文本處理 functionalities of Qt. You are not allowed to modify the document, but it can be used to output content, for example with QTextDocumentWriter ), or provide additional formatting, for example with QSyntaxHighlighter .

The class has to be used from C++ directly, using the property of the TextEdit .

警告: QTextDocument provided is used internally by Qt Quick elements to provide text manipulation primitives. You are not allowed to perform any modification of the internal state of the QTextDocument . If you do, the element in question may stop functioning or crash.

成員函數文檔編製

QQuickTextDocument:: QQuickTextDocument ( QQuickItem * parent )

Constructs a QQuickTextDocument object with parent 作為父級對象。

QTextDocument *QQuickTextDocument:: textDocument () const

返迴指針指嚮 QTextDocument 對象。