PythonQt.QtGui.QTextDocumentWriter · declarations 001
Back to PythonQt.QtGui.QTextDocumentWriter
codec
codec() -> Any
X.codec() -> PythonQt.QtCore.QTextCodec
Supplemental documentation: Qt 5 reference:
QTextCodec *QTextDocumentWriter::codec() const
Returns the codec that is currently assigned to the writer.
See also setCodec().
Upstream PySide2 reference signatures (binding differences may apply):
codec(self) -> PySide2.QtCore.QTextCodec
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#codec
device
device() -> Any
X.device() -> PythonQt.QtCore.QIODevice
Supplemental documentation: Qt 5 reference:
QIODevice *QTextDocumentWriter::device() const
Returns the device currently assigned, or nullptr if no device has been assigned.
See also setDevice().
Upstream PySide2 reference signatures (binding differences may apply):
device(self) -> PySide2.QtCore.QIODevice
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#device
fileName
fileName() -> str
X.fileName() -> str
Supplemental documentation: Qt 5 reference:
QString QTextDocumentWriter::fileName() const
If the currently assigned device is a QFile, or if setFileName() has been called, this function returns the name of the file to be written to. In all other cases, it returns an empty string.
See also setFileName() and setDevice().
Upstream PySide2 reference signatures (binding differences may apply):
fileName(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#fileName
format
format() -> Any
X.format() -> PythonQt.QtCore.QByteArray
Supplemental documentation: Qt 5 reference:
QByteArray QTextDocumentWriter::format() const
Returns the format used for writing documents.
See also setFormat().
Upstream PySide2 reference signatures (binding differences may apply):
format(self) -> PySide2.QtCore.QByteArray
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#format
setCodec
setCodec(codec: Any) -> None
X.setCodec(codec)
Supplemental documentation: Qt 5 reference:
void QTextDocumentWriter::setCodec(QTextCodec *codec)
Sets the codec for this stream to codec. The codec is used for encoding any data that is written. By default, QTextDocumentWriter uses UTF-8.
See also codec().
Upstream PySide2 reference signatures (binding differences may apply):
setCodec(self, codec: PySide2.QtCore.QTextCodec) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#setCodec
setDevice
setDevice(device: Any) -> None
X.setDevice(device)
Supplemental documentation: Qt 5 reference:
void QTextDocumentWriter::setDevice(QIODevice *device)
Sets the writer's device to the device specified. If a device has already been set, the old device is removed but otherwise left unchanged.
If the device is not already open, QTextDocumentWriter will attempt to open the device in QIODevice::WriteOnly mode by calling open().
Note: This will not work for certain devices, such as QProcess, QTcpSocket and QUdpSocket, where some configuration is required before the device can be opened.
See also device() and setFileName().
Upstream PySide2 reference signatures (binding differences may apply):
setDevice(self, device: PySide2.QtCore.QIODevice) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#setDevice
setFileName
setFileName(fileName: str) -> None
X.setFileName(fileName)
Supplemental documentation: Qt 5 reference:
void QTextDocumentWriter::setFileName(const QString \&fileName)
Sets the name of the file to be written to fileName. Internally, QTextDocumentWriter will create a QFile and open it in QIODevice::WriteOnly mode, and use this file when writing the document.
See also fileName() and setDevice().
Upstream PySide2 reference signatures (binding differences may apply):
setFileName(self, fileName: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#setFileName
setFormat
setFormat(format: Any) -> None
X.setFormat(format)
Supplemental documentation: Qt 5 reference:
void QTextDocumentWriter::setFormat(const QByteArray \&format)
Sets the format used to write documents to the format specified. format is a case insensitive text string. For example:
QTextDocumentWriter writer;
writer.setFormat("odf"); // same as writer.setFormat("ODF");
You can call supportedDocumentFormats() for the full list of formats QTextDocumentWriter supports.
See also format().
Upstream PySide2 reference signatures (binding differences may apply):
setFormat(self, format: PySide2.QtCore.QByteArray) -> None
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#setFormat
supportedDocumentFormats
supportedDocumentFormats() -> Any
X.supportedDocumentFormats()
Supplemental documentation: Qt 5 reference:
[static] QList\<QByteArray> QTextDocumentWriter::supportedDocumentFormats()
Returns the list of document formats supported by QTextDocumentWriter.
By default, Qt can write the following formats:
| Format | Description |
|---|---|
| plaintext | Plain text |
| HTML | HyperText Markup Language |
| markdown | Markdown (CommonMark or GitHub dialects) |
| ODF | OpenDocument Format |
See also setFormat().
Upstream PySide2 reference signatures (binding differences may apply):
supportedDocumentFormats() -> typing.List[PySide2.QtCore.QByteArray]
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#supportedDocumentFormats
write
write(document: Any) -> bool
X.write(document) -> bool
Supplemental documentation: Qt 5 reference:
bool QTextDocumentWriter::write(const QTextDocument *document)
Writes the given document to the assigned device or file and returns true if
successful; otherwise returns false.
bool QTextDocumentWriter::write(const QTextDocumentFragment \&fragment)
Writes the document fragment specified by fragment to the assigned device or file and
returns true if successful; otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
write(self, document: PySide2.QtGui.QTextDocument) -> bool
write(self, fragment: PySide2.QtGui.QTextDocumentFragment) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qtextdocumentwriter.html#write