class QQuickTextDocument#

The QQuickTextDocument class provides access to the QTextDocument of QQuickTextEdit. More

Inheritance diagram of PySide6.QtQuick.QQuickTextDocument

Synopsis#

Properties#

Methods#

Signals#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

This class provides access to the QTextDocument of QQuickTextEdit elements. This is provided to allow usage of the Rich Text Processing functionalities of Qt, including document modifications. It can also be used to output content, for example with QTextDocumentWriter), or provide additional formatting, for example with QSyntaxHighlighter.

class QmlIsUncreatable#
class Status#

New in version 6.7.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property modifiedᅟ: bool#
Access functions:
property sourceᅟ: QUrl#
Access functions:
property statusᅟ: QQuickTextDocument.Status#
Access functions:
__init__(parent)#
Parameters:

parentQQuickItem

Constructs a QQuickTextDocument object with parent as the parent object.

isModified()#
Return type:

bool

Getter of property modifiedᅟ .

modifiedChanged()#

Notification signal of property modifiedᅟ .

save()#
saveAs(url)#
Parameters:

urlQUrl

setModified(modified)#
Parameters:

modified – bool

See also

isModified()

Setter of property modifiedᅟ .

setSource(url)#
Parameters:

urlQUrl

See also

source()

Setter of property sourceᅟ .

setTextDocument(document)#
Parameters:

documentQTextDocument

Sets the given document.

The caller retains ownership of the document.

See also

textDocument()

source()#
Return type:

QUrl

See also

setSource()

Getter of property sourceᅟ .

sourceChanged()#

Notification signal of property sourceᅟ .

status()#
Return type:

Status

Getter of property statusᅟ .

statusChanged()#

Notification signal of property statusᅟ .

textDocument()#
Return type:

QTextDocument

Returns a pointer to the QTextDocument object.

textDocumentChanged()#

This signal is emitted when the underlying QTextDocument is replaced with a different instance.