PythonQt.QtGui.QTextDocumentWriter
QTextDocumentWriter
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
To write a document, construct a QTextDocumentWriter object with either a file name or a device object, and specify the document format to be written. You can construct a writer and set the format using setFormat() later.
Call write() to
write the document to the device. If the document is successfully written, this function
returns true. However, if an error occurs when writing the document, it will return
false.
Call supportedDocumentFormats() for a list of formats that QTextDocumentWriter can write.
Since the capabilities of the supported output formats vary considerably, the writer simply outputs the appropriate subset of objects for each format. This typically includes the formatted text and images contained in a document.
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.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) |
codec |
function | (self) -> Any |
X.codec() -> PythonQt.QtCore.QTextCodec |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
device |
function | (self) -> Any |
X.device() -> PythonQt.QtCore.QIODevice |
fileName |
function | (self) -> str |
X.fileName() -> str |
format |
function | (self) -> Any |
X.format() -> PythonQt.QtCore.QByteArray |
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) |
setCodec |
function | (self, codec: Any) -> None |
Sets the codec for this stream to codec. |
setDevice |
function | (self, device: Any) -> None |
Sets the writer's device to the device specified. |
setFileName |
function | (self, fileName: str) -> None |
Sets the name of the file to be written to fileName. |
setFormat |
function | (self, format: Any) -> None |
You can call [supportedDocumentFormats](https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#supportedDocumentFormats)() for the full list of formats… |
supportedDocumentFormats |
function | (self) -> Any |
Returns the list of document formats supported by [QTextDocumentWriter](https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html). |
write |
function | (self, document: Any) -> bool |
X.write(document) -> bool |