Skip to content

PythonQt.Qt.QTextDocumentFragment

QTextDocumentFragment

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

A QTextDocumentFragment is a fragment of rich text, that can be inserted into a QTextDocument. A document fragment can be created from a QTextDocument, from a QTextCursor's selection, or from another document fragment. Document fragments can also be created by the static functions, fromPlainText() and fromHtml().

The contents of a document fragment can be obtained as plain text by using the toPlainText() function, or it can be obtained as HTML with toHtml().

Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentfragment.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
fromHtml function (self, html: str, resourceProvider: Any) -> Any X.fromHtml(html, resourceProvider) -> PythonQt.QtGui.QTextDocumentFragment (shared captured text)
fromPlainText function (self, plainText: str) -> Any X.fromPlainText(plainText) -> PythonQt.QtGui.QTextDocumentFragment (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
isEmpty function (self) -> bool X.isEmpty() -> bool (shared captured text)
toHtml function (self, encoding: Any) -> str X.toHtml(encoding) -> str (shared captured text)
toPlainText function (self) -> str X.toPlainText() -> str (shared captured text)