KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class QTextDocument

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QTextDocument

Class hierarchy: QTextDocument » QObject

Sub-classes: FindFlag, QFlags_FindFlag, MetaInformation, QFlags_MetaInformation, Stacks, QFlags_Stacks

Public constructors

new QTextDocumentnew(QObject ptr parent = nullptr)Constructor QTextDocument::QTextDocument(QObject *parent)
new QTextDocumentnew(string text,
QObject ptr parent = nullptr)
Constructor QTextDocument::QTextDocument(const QString &text, QObject *parent)

Public methods

[const]QTextDocument ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
voidaddResource(int type,
const QUrl name,
variant resource)
Method void QTextDocument::addResource(int type, const QUrl &name, const QVariant &resource)
voidadjustSizeMethod void QTextDocument::adjustSize()
[const]QTextFormat[]allFormatsMethod QVector<QTextFormat> QTextDocument::allFormats()
[const]intavailableRedoStepsMethod int QTextDocument::availableRedoSteps()
[const]intavailableUndoStepsMethod int QTextDocument::availableUndoSteps()
[const]QUrlbaseUrlMethod QUrl QTextDocument::baseUrl()
voidbaseUrl=(const QUrl url)Method void QTextDocument::setBaseUrl(const QUrl &url)
[signal]voidbaseUrlChanged(const QUrl url)Signal declaration for QTextDocument::baseUrlChanged(const QUrl &url)
[const]QTextBlockbeginMethod QTextBlock QTextDocument::begin()
[const]intblockCountMethod int QTextDocument::blockCount()
[signal]voidblockCountChanged(int newBlockCount)Signal declaration for QTextDocument::blockCountChanged(int newBlockCount)
[const]unsigned intcharacterAt(int pos)Method QChar QTextDocument::characterAt(int pos)
[const]intcharacterCountMethod int QTextDocument::characterCount()
voidclearVirtual method void QTextDocument::clear()
voidclearUndoRedoStacks(const QTextDocument_Stacks historyToClear = QTextDocument::UndoAndRedoStacks)Method void QTextDocument::clearUndoRedoStacks(QTextDocument::Stacks historyToClear)
[const]QTextDocument ptrclone(QObject ptr parent = nullptr)Method QTextDocument *QTextDocument::clone(QObject *parent)
[signal]voidcontentsChange(int from,
int charsRemoved,
int charsAdded)
Signal declaration for QTextDocument::contentsChange(int from, int charsRemoved, int charsAdded)
[signal]voidcontentsChangedSignal declaration for QTextDocument::contentsChanged()
[signal]voidcursorPositionChanged(const QTextCursor cursor)Signal declaration for QTextDocument::cursorPositionChanged(const QTextCursor &cursor)
[const]Qt_CursorMoveStyledefaultCursorMoveStyleMethod Qt::CursorMoveStyle QTextDocument::defaultCursorMoveStyle()
voiddefaultCursorMoveStyle=(const Qt_CursorMoveStyle style)Method void QTextDocument::setDefaultCursorMoveStyle(Qt::CursorMoveStyle style)
[const]QFontdefaultFontMethod QFont QTextDocument::defaultFont()
voiddefaultFont=(const QFont font)Method void QTextDocument::setDefaultFont(const QFont &font)
[const]stringdefaultStyleSheetMethod QString QTextDocument::defaultStyleSheet()
voiddefaultStyleSheet=(string sheet)Method void QTextDocument::setDefaultStyleSheet(const QString &sheet)
[const]QTextOptiondefaultTextOptionMethod QTextOption QTextDocument::defaultTextOption()
voiddefaultTextOption=(const QTextOption option)Method void QTextDocument::setDefaultTextOption(const QTextOption &option)
[signal]voiddestroyed(QObject ptr arg1)Signal declaration for QTextDocument::destroyed(QObject *)
[const]QAbstractTextDocumentLayout ptrdocumentLayoutMethod QAbstractTextDocumentLayout *QTextDocument::documentLayout()
voiddocumentLayout=(QAbstractTextDocumentLayout ptr layout)Method void QTextDocument::setDocumentLayout(QAbstractTextDocumentLayout *layout)
[signal]voiddocumentLayoutChangedSignal declaration for QTextDocument::documentLayoutChanged()
[const]doubledocumentMarginMethod double QTextDocument::documentMargin()
voiddocumentMargin=(double margin)Method void QTextDocument::setDocumentMargin(double margin)
voiddrawContents(QPainter ptr painter,
const QRectF rect = QRectF())
Method void QTextDocument::drawContents(QPainter *painter, const QRectF &rect)
voidemit_baseUrlChanged(const QUrl url)Emitter for signal void QTextDocument::baseUrlChanged(const QUrl &url)
voidemit_blockCountChanged(int newBlockCount)Emitter for signal void QTextDocument::blockCountChanged(int newBlockCount)
voidemit_contentsChange(int from,
int charsRemoved,
int charsAdded)
Emitter for signal void QTextDocument::contentsChange(int from, int charsRemoved, int charsAdded)
voidemit_contentsChangedEmitter for signal void QTextDocument::contentsChanged()
voidemit_cursorPositionChanged(const QTextCursor cursor)Emitter for signal void QTextDocument::cursorPositionChanged(const QTextCursor &cursor)
voidemit_destroyed(QObject ptr arg1 = nullptr)Emitter for signal void QTextDocument::destroyed(QObject *)
voidemit_documentLayoutChangedEmitter for signal void QTextDocument::documentLayoutChanged()
voidemit_modificationChanged(bool m)Emitter for signal void QTextDocument::modificationChanged(bool m)
voidemit_objectNameChanged(string objectName)Emitter for signal void QTextDocument::objectNameChanged(const QString &objectName)
voidemit_redoAvailable(bool arg1)Emitter for signal void QTextDocument::redoAvailable(bool)
voidemit_undoAvailable(bool arg1)Emitter for signal void QTextDocument::undoAvailable(bool)
voidemit_undoCommandAddedEmitter for signal void QTextDocument::undoCommandAdded()
[const]QTextBlockendMethod QTextBlock QTextDocument::end()
boolevent(QEvent ptr event)Virtual method bool QTextDocument::event(QEvent *event)
booleventFilter(QObject ptr watched,
QEvent ptr event)
Virtual method bool QTextDocument::eventFilter(QObject *watched, QEvent *event)
[const]QTextCursorfind(string subString,
int from = 0,
QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())
Method QTextCursor QTextDocument::find(const QString &subString, int from, QFlags<QTextDocument::FindFlag> options)
[const]QTextCursorfind(string subString,
const QTextCursor cursor,
QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())
Method QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, QFlags<QTextDocument::FindFlag> options)
[const]QTextCursorfind(const QRegExp expr,
int from = 0,
QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())
Method QTextCursor QTextDocument::find(const QRegExp &expr, int from, QFlags<QTextDocument::FindFlag> options)
[const]QTextCursorfind(const QRegExp expr,
const QTextCursor cursor,
QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())
Method QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, QFlags<QTextDocument::FindFlag> options)
[const]QTextCursorfind(const QRegularExpression expr,
int from = 0,
QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())
Method QTextCursor QTextDocument::find(const QRegularExpression &expr, int from, QFlags<QTextDocument::FindFlag> options)
[const]QTextCursorfind(const QRegularExpression expr,
const QTextCursor cursor,
QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())
Method QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCursor &cursor, QFlags<QTextDocument::FindFlag> options)
[const]QTextBlockfindBlock(int pos)Method QTextBlock QTextDocument::findBlock(int pos)
[const]QTextBlockfindBlockByLineNumber(int blockNumber)Method QTextBlock QTextDocument::findBlockByLineNumber(int blockNumber)
[const]QTextBlockfindBlockByNumber(int blockNumber)Method QTextBlock QTextDocument::findBlockByNumber(int blockNumber)
[const]QTextBlockfirstBlockMethod QTextBlock QTextDocument::firstBlock()
[const]QTextFrame ptrframeAt(int pos)Method QTextFrame *QTextDocument::frameAt(int pos)
[const]doubleidealWidthMethod double QTextDocument::idealWidth()
[const]doubleindentWidthMethod double QTextDocument::indentWidth()
voidindentWidth=(double width)Method void QTextDocument::setIndentWidth(double width)
[const]boolisEmpty?Method bool QTextDocument::isEmpty()
[const]boolisModified?Method bool QTextDocument::isModified()
[const]boolisRedoAvailable?Method bool QTextDocument::isRedoAvailable()
[const]boolisUndoAvailable?Method bool QTextDocument::isUndoAvailable()
[const]boolisUndoRedoEnabled?Method bool QTextDocument::isUndoRedoEnabled()
[const]QTextBlocklastBlockMethod QTextBlock QTextDocument::lastBlock()
[const]intlineCountMethod int QTextDocument::lineCount()
voidmarkContentsDirty(int from,
int length)
Method void QTextDocument::markContentsDirty(int from, int length)
[const]intmaximumBlockCountMethod int QTextDocument::maximumBlockCount()
voidmaximumBlockCount=(int maximum)Method void QTextDocument::setMaximumBlockCount(int maximum)
[const]stringmetaInformation(const QTextDocument_MetaInformation info)Method QString QTextDocument::metaInformation(QTextDocument::MetaInformation info)
[signal]voidmodificationChanged(bool m)Signal declaration for QTextDocument::modificationChanged(bool m)
[const]boolmodifiedMethod bool QTextDocument::isModified()
voidmodified=(bool m = true)Method void QTextDocument::setModified(bool m)
[const]QTextObject ptrobject(int objectIndex)Method QTextObject *QTextDocument::object(int objectIndex)
[const]QTextObject ptrobjectForFormat(const QTextFormat arg1)Method QTextObject *QTextDocument::objectForFormat(const QTextFormat &)
[signal]voidobjectNameChanged(string objectName)Signal declaration for QTextDocument::objectNameChanged(const QString &objectName)
[const]intpageCountMethod int QTextDocument::pageCount()
[const]QSizeFpageSizeMethod QSizeF QTextDocument::pageSize()
voidpageSize=(const QSizeF size)Method void QTextDocument::setPageSize(const QSizeF &size)
[const]voidprint(QPagedPaintDevice ptr printer)Method void QTextDocument::print(QPagedPaintDevice *printer)
voidredo(QTextCursor ptr cursor)Method void QTextDocument::redo(QTextCursor *cursor)
voidredoMethod void QTextDocument::redo()
[signal]voidredoAvailable(bool arg1)Signal declaration for QTextDocument::redoAvailable(bool)
[const]variantresource(int type,
const QUrl name)
Method QVariant QTextDocument::resource(int type, const QUrl &name)
[const]intrevisionMethod int QTextDocument::revision()
[const]QTextFrame ptrrootFrameMethod QTextFrame *QTextDocument::rootFrame()
voidsetBaseUrl(const QUrl url)Method void QTextDocument::setBaseUrl(const QUrl &url)
voidsetDefaultCursorMoveStyle(const Qt_CursorMoveStyle style)Method void QTextDocument::setDefaultCursorMoveStyle(Qt::CursorMoveStyle style)
voidsetDefaultFont(const QFont font)Method void QTextDocument::setDefaultFont(const QFont &font)
voidsetDefaultStyleSheet(string sheet)Method void QTextDocument::setDefaultStyleSheet(const QString &sheet)
voidsetDefaultTextOption(const QTextOption option)Method void QTextDocument::setDefaultTextOption(const QTextOption &option)
voidsetDocumentLayout(QAbstractTextDocumentLayout ptr layout)Method void QTextDocument::setDocumentLayout(QAbstractTextDocumentLayout *layout)
voidsetDocumentMargin(double margin)Method void QTextDocument::setDocumentMargin(double margin)
voidsetHtml(string html)Method void QTextDocument::setHtml(const QString &html)
voidsetIndentWidth(double width)Method void QTextDocument::setIndentWidth(double width)
voidsetMaximumBlockCount(int maximum)Method void QTextDocument::setMaximumBlockCount(int maximum)
voidsetMetaInformation(const QTextDocument_MetaInformation info,
string arg2)
Method void QTextDocument::setMetaInformation(QTextDocument::MetaInformation info, const QString &)
voidsetModified(bool m = true)Method void QTextDocument::setModified(bool m)
voidsetPageSize(const QSizeF size)Method void QTextDocument::setPageSize(const QSizeF &size)
voidsetPlainText(string text)Method void QTextDocument::setPlainText(const QString &text)
voidsetTextWidth(double width)Method void QTextDocument::setTextWidth(double width)
voidsetUndoRedoEnabled(bool enable)Method void QTextDocument::setUndoRedoEnabled(bool enable)
voidsetUseDesignMetrics(bool b)Method void QTextDocument::setUseDesignMetrics(bool b)
[const]QSizeFsizeMethod QSizeF QTextDocument::size()
[const]doubletextWidthMethod double QTextDocument::textWidth()
voidtextWidth=(double width)Method void QTextDocument::setTextWidth(double width)
[const]stringtoHtml(bytes encoding = QByteArray())Method QString QTextDocument::toHtml(const QByteArray &encoding)
[const]stringtoPlainTextMethod QString QTextDocument::toPlainText()
[const]stringtoRawTextMethod QString QTextDocument::toRawText()
voidundo(QTextCursor ptr cursor)Method void QTextDocument::undo(QTextCursor *cursor)
voidundoMethod void QTextDocument::undo()
[signal]voidundoAvailable(bool arg1)Signal declaration for QTextDocument::undoAvailable(bool)
[signal]voidundoCommandAddedSignal declaration for QTextDocument::undoCommandAdded()
[const]boolundoRedoEnabledMethod bool QTextDocument::isUndoRedoEnabled()
voidundoRedoEnabled=(bool enable)Method void QTextDocument::setUndoRedoEnabled(bool enable)
[const]booluseDesignMetricsMethod bool QTextDocument::useDesignMetrics()
voiduseDesignMetrics=(bool b)Method void QTextDocument::setUseDesignMetrics(bool b)

Public static methods and constants

[static,const]QTextDocument_MetaInformationDocumentTitleEnum constant QTextDocument::DocumentTitle
[static,const]QTextDocument_MetaInformationDocumentUrlEnum constant QTextDocument::DocumentUrl
[static,const]QTextDocument_FindFlagFindBackwardEnum constant QTextDocument::FindBackward
[static,const]QTextDocument_FindFlagFindCaseSensitivelyEnum constant QTextDocument::FindCaseSensitively
[static,const]QTextDocument_FindFlagFindWholeWordsEnum constant QTextDocument::FindWholeWords
[static,const]QTextDocument_StacksRedoStackEnum constant QTextDocument::RedoStack
[static,const]QTextDocument_StacksUndoAndRedoStacksEnum constant QTextDocument::UndoAndRedoStacks
[static,const]QTextDocument_StacksUndoStackEnum constant QTextDocument::UndoStack
QMetaObjectstaticMetaObjectObtains the static MetaObject for this class.
stringtr(string s,
string c = nullptr,
int n = -1)
Static method QString QTextDocument::tr(const char *s, const char *c, int n)
stringtrUtf8(string s,
string c = nullptr,
int n = -1)
Static method QString QTextDocument::trUtf8(const char *s, const char *c, int n)

Protected methods (static, non-static and constructors)

voidchildEvent(QChildEvent ptr event)Virtual method void QTextDocument::childEvent(QChildEvent *event)
QTextObject ptrcreateObject(const QTextFormat f)Virtual method QTextObject *QTextDocument::createObject(const QTextFormat &f)
voidcustomEvent(QEvent ptr event)Virtual method void QTextDocument::customEvent(QEvent *event)
voiddisconnectNotify(const QMetaMethod signal)Virtual method void QTextDocument::disconnectNotify(const QMetaMethod &signal)
[const]boolisSignalConnected(const QMetaMethod signal)Method bool QTextDocument::isSignalConnected(const QMetaMethod &signal)
variantloadResource(int type,
const QUrl name)
Virtual method QVariant QTextDocument::loadResource(int type, const QUrl &name)
[const]intreceivers(string signal)Method int QTextDocument::receivers(const char *signal)
[const]QObject ptrsenderMethod QObject *QTextDocument::sender()
[const]intsenderSignalIndexMethod int QTextDocument::senderSignalIndex()
voidtimerEvent(QTimerEvent ptr event)Virtual method void QTextDocument::timerEvent(QTimerEvent *event)

Detailed description

DocumentTitle

Signature: [static,const] QTextDocument_MetaInformation DocumentTitle

Description: Enum constant QTextDocument::DocumentTitle

Python specific notes:
The object exposes a readable attribute 'DocumentTitle'. This is the getter.

DocumentUrl

Signature: [static,const] QTextDocument_MetaInformation DocumentUrl

Description: Enum constant QTextDocument::DocumentUrl

Python specific notes:
The object exposes a readable attribute 'DocumentUrl'. This is the getter.

FindBackward

Signature: [static,const] QTextDocument_FindFlag FindBackward

Description: Enum constant QTextDocument::FindBackward

Python specific notes:
The object exposes a readable attribute 'FindBackward'. This is the getter.

FindCaseSensitively

Signature: [static,const] QTextDocument_FindFlag FindCaseSensitively

Description: Enum constant QTextDocument::FindCaseSensitively

Python specific notes:
The object exposes a readable attribute 'FindCaseSensitively'. This is the getter.

FindWholeWords

Signature: [static,const] QTextDocument_FindFlag FindWholeWords

Description: Enum constant QTextDocument::FindWholeWords

Python specific notes:
The object exposes a readable attribute 'FindWholeWords'. This is the getter.

RedoStack

Signature: [static,const] QTextDocument_Stacks RedoStack

Description: Enum constant QTextDocument::RedoStack

Python specific notes:
The object exposes a readable attribute 'RedoStack'. This is the getter.

UndoAndRedoStacks

Signature: [static,const] QTextDocument_Stacks UndoAndRedoStacks

Description: Enum constant QTextDocument::UndoAndRedoStacks

Python specific notes:
The object exposes a readable attribute 'UndoAndRedoStacks'. This is the getter.

UndoStack

Signature: [static,const] QTextDocument_Stacks UndoStack

Description: Enum constant QTextDocument::UndoStack

Python specific notes:
The object exposes a readable attribute 'UndoStack'. This is the getter.

_const_cast

Signature: [const] QTextDocument ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

addResource

Signature: void addResource (int type, const QUrl name, variant resource)

Description: Method void QTextDocument::addResource(int type, const QUrl &name, const QVariant &resource)

adjustSize

Signature: void adjustSize

Description: Method void QTextDocument::adjustSize()

allFormats

Signature: [const] QTextFormat[] allFormats

Description: Method QVector<QTextFormat> QTextDocument::allFormats()

availableRedoSteps

Signature: [const] int availableRedoSteps

Description: Method int QTextDocument::availableRedoSteps()

availableUndoSteps

Signature: [const] int availableUndoSteps

Description: Method int QTextDocument::availableUndoSteps()

baseUrl

Signature: [const] QUrl baseUrl

Description: Method QUrl QTextDocument::baseUrl()

Python specific notes:
The object exposes a readable attribute 'baseUrl'. This is the getter.

baseUrl=

Signature: void baseUrl= (const QUrl url)

Description: Method void QTextDocument::setBaseUrl(const QUrl &url)

Python specific notes:
The object exposes a writable attribute 'baseUrl'. This is the setter.

baseUrlChanged

Signature: [signal] void baseUrlChanged (const QUrl url)

Description: Signal declaration for QTextDocument::baseUrlChanged(const QUrl &url)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'baseUrlChanged'. This is the getter.
The object exposes a writable attribute 'baseUrlChanged'. This is the setter.

begin

Signature: [const] QTextBlock begin

Description: Method QTextBlock QTextDocument::begin()

blockCount

Signature: [const] int blockCount

Description: Method int QTextDocument::blockCount()

Python specific notes:
The object exposes a readable attribute 'blockCount'. This is the getter.

blockCountChanged

Signature: [signal] void blockCountChanged (int newBlockCount)

Description: Signal declaration for QTextDocument::blockCountChanged(int newBlockCount)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'blockCountChanged'. This is the getter.
The object exposes a writable attribute 'blockCountChanged'. This is the setter.

characterAt

Signature: [const] unsigned int characterAt (int pos)

Description: Method QChar QTextDocument::characterAt(int pos)

characterCount

Signature: [const] int characterCount

Description: Method int QTextDocument::characterCount()

childEvent

Signature: void childEvent (QChildEvent ptr event)

Description: Virtual method void QTextDocument::childEvent(QChildEvent *event)

This method can be reimplemented in a derived class.

clear

Signature: void clear

Description: Virtual method void QTextDocument::clear()

This method can be reimplemented in a derived class.

clearUndoRedoStacks

Signature: void clearUndoRedoStacks (const QTextDocument_Stacks historyToClear = QTextDocument::UndoAndRedoStacks)

Description: Method void QTextDocument::clearUndoRedoStacks(QTextDocument::Stacks historyToClear)

clone

Signature: [const] QTextDocument ptr clone (QObject ptr parent = nullptr)

Description: Method QTextDocument *QTextDocument::clone(QObject *parent)

contentsChange

Signature: [signal] void contentsChange (int from, int charsRemoved, int charsAdded)

Description: Signal declaration for QTextDocument::contentsChange(int from, int charsRemoved, int charsAdded)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'contentsChange'. This is the getter.
The object exposes a writable attribute 'contentsChange'. This is the setter.

contentsChanged

Signature: [signal] void contentsChanged

Description: Signal declaration for QTextDocument::contentsChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'contentsChanged'. This is the getter.
The object exposes a writable attribute 'contentsChanged'. This is the setter.

createObject

Signature: QTextObject ptr createObject (const QTextFormat f)

Description: Virtual method QTextObject *QTextDocument::createObject(const QTextFormat &f)

This method can be reimplemented in a derived class.

cursorPositionChanged

Signature: [signal] void cursorPositionChanged (const QTextCursor cursor)

Description: Signal declaration for QTextDocument::cursorPositionChanged(const QTextCursor &cursor)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'cursorPositionChanged'. This is the getter.
The object exposes a writable attribute 'cursorPositionChanged'. This is the setter.

customEvent

Signature: void customEvent (QEvent ptr event)

Description: Virtual method void QTextDocument::customEvent(QEvent *event)

This method can be reimplemented in a derived class.

defaultCursorMoveStyle

Signature: [const] Qt_CursorMoveStyle defaultCursorMoveStyle

Description: Method Qt::CursorMoveStyle QTextDocument::defaultCursorMoveStyle()

Python specific notes:
The object exposes a readable attribute 'defaultCursorMoveStyle'. This is the getter.

defaultCursorMoveStyle=

Signature: void defaultCursorMoveStyle= (const Qt_CursorMoveStyle style)

Description: Method void QTextDocument::setDefaultCursorMoveStyle(Qt::CursorMoveStyle style)

Python specific notes:
The object exposes a writable attribute 'defaultCursorMoveStyle'. This is the setter.

defaultFont

Signature: [const] QFont defaultFont

Description: Method QFont QTextDocument::defaultFont()

Python specific notes:
The object exposes a readable attribute 'defaultFont'. This is the getter.

defaultFont=

Signature: void defaultFont= (const QFont font)

Description: Method void QTextDocument::setDefaultFont(const QFont &font)

Python specific notes:
The object exposes a writable attribute 'defaultFont'. This is the setter.

defaultStyleSheet

Signature: [const] string defaultStyleSheet

Description: Method QString QTextDocument::defaultStyleSheet()

Python specific notes:
The object exposes a readable attribute 'defaultStyleSheet'. This is the getter.

defaultStyleSheet=

Signature: void defaultStyleSheet= (string sheet)

Description: Method void QTextDocument::setDefaultStyleSheet(const QString &sheet)

Python specific notes:
The object exposes a writable attribute 'defaultStyleSheet'. This is the setter.

defaultTextOption

Signature: [const] QTextOption defaultTextOption

Description: Method QTextOption QTextDocument::defaultTextOption()

Python specific notes:
The object exposes a readable attribute 'defaultTextOption'. This is the getter.

defaultTextOption=

Signature: void defaultTextOption= (const QTextOption option)

Description: Method void QTextDocument::setDefaultTextOption(const QTextOption &option)

Python specific notes:
The object exposes a writable attribute 'defaultTextOption'. This is the setter.

destroyed

Signature: [signal] void destroyed (QObject ptr arg1)

Description: Signal declaration for QTextDocument::destroyed(QObject *)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'destroyed'. This is the getter.
The object exposes a writable attribute 'destroyed'. This is the setter.

disconnectNotify

Signature: void disconnectNotify (const QMetaMethod signal)

Description: Virtual method void QTextDocument::disconnectNotify(const QMetaMethod &signal)

This method can be reimplemented in a derived class.

documentLayout

Signature: [const] QAbstractTextDocumentLayout ptr documentLayout

Description: Method QAbstractTextDocumentLayout *QTextDocument::documentLayout()

Python specific notes:
The object exposes a readable attribute 'documentLayout'. This is the getter.

documentLayout=

Signature: void documentLayout= (QAbstractTextDocumentLayout ptr layout)

Description: Method void QTextDocument::setDocumentLayout(QAbstractTextDocumentLayout *layout)

Python specific notes:
The object exposes a writable attribute 'documentLayout'. This is the setter.

documentLayoutChanged

Signature: [signal] void documentLayoutChanged

Description: Signal declaration for QTextDocument::documentLayoutChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'documentLayoutChanged'. This is the getter.
The object exposes a writable attribute 'documentLayoutChanged'. This is the setter.

documentMargin

Signature: [const] double documentMargin

Description: Method double QTextDocument::documentMargin()

Python specific notes:
The object exposes a readable attribute 'documentMargin'. This is the getter.

documentMargin=

Signature: void documentMargin= (double margin)

Description: Method void QTextDocument::setDocumentMargin(double margin)

Python specific notes:
The object exposes a writable attribute 'documentMargin'. This is the setter.

drawContents

Signature: void drawContents (QPainter ptr painter, const QRectF rect = QRectF())

Description: Method void QTextDocument::drawContents(QPainter *painter, const QRectF &rect)

emit_baseUrlChanged

Signature: void emit_baseUrlChanged (const QUrl url)

Description: Emitter for signal void QTextDocument::baseUrlChanged(const QUrl &url)

Call this method to emit this signal.

emit_blockCountChanged

Signature: void emit_blockCountChanged (int newBlockCount)

Description: Emitter for signal void QTextDocument::blockCountChanged(int newBlockCount)

Call this method to emit this signal.

emit_contentsChange

Signature: void emit_contentsChange (int from, int charsRemoved, int charsAdded)

Description: Emitter for signal void QTextDocument::contentsChange(int from, int charsRemoved, int charsAdded)

Call this method to emit this signal.

emit_contentsChanged

Signature: void emit_contentsChanged

Description: Emitter for signal void QTextDocument::contentsChanged()

Call this method to emit this signal.

emit_cursorPositionChanged

Signature: void emit_cursorPositionChanged (const QTextCursor cursor)

Description: Emitter for signal void QTextDocument::cursorPositionChanged(const QTextCursor &cursor)

Call this method to emit this signal.

emit_destroyed

Signature: void emit_destroyed (QObject ptr arg1 = nullptr)

Description: Emitter for signal void QTextDocument::destroyed(QObject *)

Call this method to emit this signal.

emit_documentLayoutChanged

Signature: void emit_documentLayoutChanged

Description: Emitter for signal void QTextDocument::documentLayoutChanged()

Call this method to emit this signal.

emit_modificationChanged

Signature: void emit_modificationChanged (bool m)

Description: Emitter for signal void QTextDocument::modificationChanged(bool m)

Call this method to emit this signal.

emit_objectNameChanged

Signature: void emit_objectNameChanged (string objectName)

Description: Emitter for signal void QTextDocument::objectNameChanged(const QString &objectName)

Call this method to emit this signal.

emit_redoAvailable

Signature: void emit_redoAvailable (bool arg1)

Description: Emitter for signal void QTextDocument::redoAvailable(bool)

Call this method to emit this signal.

emit_undoAvailable

Signature: void emit_undoAvailable (bool arg1)

Description: Emitter for signal void QTextDocument::undoAvailable(bool)

Call this method to emit this signal.

emit_undoCommandAdded

Signature: void emit_undoCommandAdded

Description: Emitter for signal void QTextDocument::undoCommandAdded()

Call this method to emit this signal.

end

Signature: [const] QTextBlock end

Description: Method QTextBlock QTextDocument::end()

event

Signature: bool event (QEvent ptr event)

Description: Virtual method bool QTextDocument::event(QEvent *event)

This method can be reimplemented in a derived class.

eventFilter

Signature: bool eventFilter (QObject ptr watched, QEvent ptr event)

Description: Virtual method bool QTextDocument::eventFilter(QObject *watched, QEvent *event)

This method can be reimplemented in a derived class.

find

(1) Signature: [const] QTextCursor find (string subString, int from = 0, QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())

Description: Method QTextCursor QTextDocument::find(const QString &subString, int from, QFlags<QTextDocument::FindFlag> options)

(2) Signature: [const] QTextCursor find (string subString, const QTextCursor cursor, QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())

Description: Method QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, QFlags<QTextDocument::FindFlag> options)

(3) Signature: [const] QTextCursor find (const QRegExp expr, int from = 0, QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())

Description: Method QTextCursor QTextDocument::find(const QRegExp &expr, int from, QFlags<QTextDocument::FindFlag> options)

(4) Signature: [const] QTextCursor find (const QRegExp expr, const QTextCursor cursor, QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())

Description: Method QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, QFlags<QTextDocument::FindFlag> options)

(5) Signature: [const] QTextCursor find (const QRegularExpression expr, int from = 0, QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())

Description: Method QTextCursor QTextDocument::find(const QRegularExpression &expr, int from, QFlags<QTextDocument::FindFlag> options)

(6) Signature: [const] QTextCursor find (const QRegularExpression expr, const QTextCursor cursor, QTextDocument_QFlags_FindFlag options = QTextDocument::FindFlags())

Description: Method QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCursor &cursor, QFlags<QTextDocument::FindFlag> options)

findBlock

Signature: [const] QTextBlock findBlock (int pos)

Description: Method QTextBlock QTextDocument::findBlock(int pos)

findBlockByLineNumber

Signature: [const] QTextBlock findBlockByLineNumber (int blockNumber)

Description: Method QTextBlock QTextDocument::findBlockByLineNumber(int blockNumber)

findBlockByNumber

Signature: [const] QTextBlock findBlockByNumber (int blockNumber)

Description: Method QTextBlock QTextDocument::findBlockByNumber(int blockNumber)

firstBlock

Signature: [const] QTextBlock firstBlock

Description: Method QTextBlock QTextDocument::firstBlock()

frameAt

Signature: [const] QTextFrame ptr frameAt (int pos)

Description: Method QTextFrame *QTextDocument::frameAt(int pos)

idealWidth

Signature: [const] double idealWidth

Description: Method double QTextDocument::idealWidth()

indentWidth

Signature: [const] double indentWidth

Description: Method double QTextDocument::indentWidth()

Python specific notes:
The object exposes a readable attribute 'indentWidth'. This is the getter.

indentWidth=

Signature: void indentWidth= (double width)

Description: Method void QTextDocument::setIndentWidth(double width)

Python specific notes:
The object exposes a writable attribute 'indentWidth'. This is the setter.

isEmpty?

Signature: [const] bool isEmpty?

Description: Method bool QTextDocument::isEmpty()

isModified?

Signature: [const] bool isModified?

Description: Method bool QTextDocument::isModified()

Python specific notes:
The object exposes a readable attribute 'modified'. This is the getter.

isRedoAvailable?

Signature: [const] bool isRedoAvailable?

Description: Method bool QTextDocument::isRedoAvailable()

isSignalConnected

Signature: [const] bool isSignalConnected (const QMetaMethod signal)

Description: Method bool QTextDocument::isSignalConnected(const QMetaMethod &signal)

This method is protected and can only be called from inside a derived class.

isUndoAvailable?

Signature: [const] bool isUndoAvailable?

Description: Method bool QTextDocument::isUndoAvailable()

isUndoRedoEnabled?

Signature: [const] bool isUndoRedoEnabled?

Description: Method bool QTextDocument::isUndoRedoEnabled()

Python specific notes:
The object exposes a readable attribute 'undoRedoEnabled'. This is the getter.

lastBlock

Signature: [const] QTextBlock lastBlock

Description: Method QTextBlock QTextDocument::lastBlock()

lineCount

Signature: [const] int lineCount

Description: Method int QTextDocument::lineCount()

loadResource

Signature: variant loadResource (int type, const QUrl name)

Description: Virtual method QVariant QTextDocument::loadResource(int type, const QUrl &name)

This method can be reimplemented in a derived class.

markContentsDirty

Signature: void markContentsDirty (int from, int length)

Description: Method void QTextDocument::markContentsDirty(int from, int length)

maximumBlockCount

Signature: [const] int maximumBlockCount

Description: Method int QTextDocument::maximumBlockCount()

Python specific notes:
The object exposes a readable attribute 'maximumBlockCount'. This is the getter.

maximumBlockCount=

Signature: void maximumBlockCount= (int maximum)

Description: Method void QTextDocument::setMaximumBlockCount(int maximum)

Python specific notes:
The object exposes a writable attribute 'maximumBlockCount'. This is the setter.

metaInformation

Signature: [const] string metaInformation (const QTextDocument_MetaInformation info)

Description: Method QString QTextDocument::metaInformation(QTextDocument::MetaInformation info)

modificationChanged

Signature: [signal] void modificationChanged (bool m)

Description: Signal declaration for QTextDocument::modificationChanged(bool m)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'modificationChanged'. This is the getter.
The object exposes a writable attribute 'modificationChanged'. This is the setter.

modified

Signature: [const] bool modified

Description: Method bool QTextDocument::isModified()

Python specific notes:
The object exposes a readable attribute 'modified'. This is the getter.

modified=

Signature: void modified= (bool m = true)

Description: Method void QTextDocument::setModified(bool m)

Python specific notes:
The object exposes a writable attribute 'modified'. This is the setter.

new

(1) Signature: [static] new QTextDocument new (QObject ptr parent = nullptr)

Description: Constructor QTextDocument::QTextDocument(QObject *parent)

This method creates an object of class QTextDocument.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QTextDocument new (string text, QObject ptr parent = nullptr)

Description: Constructor QTextDocument::QTextDocument(const QString &text, QObject *parent)

This method creates an object of class QTextDocument.

Python specific notes:
This method is the default initializer of the object.

object

Signature: [const] QTextObject ptr object (int objectIndex)

Description: Method QTextObject *QTextDocument::object(int objectIndex)

objectForFormat

Signature: [const] QTextObject ptr objectForFormat (const QTextFormat arg1)

Description: Method QTextObject *QTextDocument::objectForFormat(const QTextFormat &)

objectNameChanged

Signature: [signal] void objectNameChanged (string objectName)

Description: Signal declaration for QTextDocument::objectNameChanged(const QString &objectName)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'objectNameChanged'. This is the getter.
The object exposes a writable attribute 'objectNameChanged'. This is the setter.

pageCount

Signature: [const] int pageCount

Description: Method int QTextDocument::pageCount()

pageSize

Signature: [const] QSizeF pageSize

Description: Method QSizeF QTextDocument::pageSize()

Python specific notes:
The object exposes a readable attribute 'pageSize'. This is the getter.

pageSize=

Signature: void pageSize= (const QSizeF size)

Description: Method void QTextDocument::setPageSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'pageSize'. This is the setter.

print

Signature: [const] void print (QPagedPaintDevice ptr printer)

Description: Method void QTextDocument::print(QPagedPaintDevice *printer)

Python specific notes:
This attribute is available as 'print_' in Python.

receivers

Signature: [const] int receivers (string signal)

Description: Method int QTextDocument::receivers(const char *signal)

This method is protected and can only be called from inside a derived class.

redo

(1) Signature: void redo (QTextCursor ptr cursor)

Description: Method void QTextDocument::redo(QTextCursor *cursor)

(2) Signature: void redo

Description: Method void QTextDocument::redo()

redoAvailable

Signature: [signal] void redoAvailable (bool arg1)

Description: Signal declaration for QTextDocument::redoAvailable(bool)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'redoAvailable'. This is the getter.
The object exposes a writable attribute 'redoAvailable'. This is the setter.

resource

Signature: [const] variant resource (int type, const QUrl name)

Description: Method QVariant QTextDocument::resource(int type, const QUrl &name)

revision

Signature: [const] int revision

Description: Method int QTextDocument::revision()

rootFrame

Signature: [const] QTextFrame ptr rootFrame

Description: Method QTextFrame *QTextDocument::rootFrame()

sender

Signature: [const] QObject ptr sender

Description: Method QObject *QTextDocument::sender()

This method is protected and can only be called from inside a derived class.

senderSignalIndex

Signature: [const] int senderSignalIndex

Description: Method int QTextDocument::senderSignalIndex()

This method is protected and can only be called from inside a derived class.

setBaseUrl

Signature: void setBaseUrl (const QUrl url)

Description: Method void QTextDocument::setBaseUrl(const QUrl &url)

Python specific notes:
The object exposes a writable attribute 'baseUrl'. This is the setter.

setDefaultCursorMoveStyle

Signature: void setDefaultCursorMoveStyle (const Qt_CursorMoveStyle style)

Description: Method void QTextDocument::setDefaultCursorMoveStyle(Qt::CursorMoveStyle style)

Python specific notes:
The object exposes a writable attribute 'defaultCursorMoveStyle'. This is the setter.

setDefaultFont

Signature: void setDefaultFont (const QFont font)

Description: Method void QTextDocument::setDefaultFont(const QFont &font)

Python specific notes:
The object exposes a writable attribute 'defaultFont'. This is the setter.

setDefaultStyleSheet

Signature: void setDefaultStyleSheet (string sheet)

Description: Method void QTextDocument::setDefaultStyleSheet(const QString &sheet)

Python specific notes:
The object exposes a writable attribute 'defaultStyleSheet'. This is the setter.

setDefaultTextOption

Signature: void setDefaultTextOption (const QTextOption option)

Description: Method void QTextDocument::setDefaultTextOption(const QTextOption &option)

Python specific notes:
The object exposes a writable attribute 'defaultTextOption'. This is the setter.

setDocumentLayout

Signature: void setDocumentLayout (QAbstractTextDocumentLayout ptr layout)

Description: Method void QTextDocument::setDocumentLayout(QAbstractTextDocumentLayout *layout)

Python specific notes:
The object exposes a writable attribute 'documentLayout'. This is the setter.

setDocumentMargin

Signature: void setDocumentMargin (double margin)

Description: Method void QTextDocument::setDocumentMargin(double margin)

Python specific notes:
The object exposes a writable attribute 'documentMargin'. This is the setter.

setHtml

Signature: void setHtml (string html)

Description: Method void QTextDocument::setHtml(const QString &html)

setIndentWidth

Signature: void setIndentWidth (double width)

Description: Method void QTextDocument::setIndentWidth(double width)

Python specific notes:
The object exposes a writable attribute 'indentWidth'. This is the setter.

setMaximumBlockCount

Signature: void setMaximumBlockCount (int maximum)

Description: Method void QTextDocument::setMaximumBlockCount(int maximum)

Python specific notes:
The object exposes a writable attribute 'maximumBlockCount'. This is the setter.

setMetaInformation

Signature: void setMetaInformation (const QTextDocument_MetaInformation info, string arg2)

Description: Method void QTextDocument::setMetaInformation(QTextDocument::MetaInformation info, const QString &)

setModified

Signature: void setModified (bool m = true)

Description: Method void QTextDocument::setModified(bool m)

Python specific notes:
The object exposes a writable attribute 'modified'. This is the setter.

setPageSize

Signature: void setPageSize (const QSizeF size)

Description: Method void QTextDocument::setPageSize(const QSizeF &size)

Python specific notes:
The object exposes a writable attribute 'pageSize'. This is the setter.

setPlainText

Signature: void setPlainText (string text)

Description: Method void QTextDocument::setPlainText(const QString &text)

setTextWidth

Signature: void setTextWidth (double width)

Description: Method void QTextDocument::setTextWidth(double width)

Python specific notes:
The object exposes a writable attribute 'textWidth'. This is the setter.

setUndoRedoEnabled

Signature: void setUndoRedoEnabled (bool enable)

Description: Method void QTextDocument::setUndoRedoEnabled(bool enable)

Python specific notes:
The object exposes a writable attribute 'undoRedoEnabled'. This is the setter.

setUseDesignMetrics

Signature: void setUseDesignMetrics (bool b)

Description: Method void QTextDocument::setUseDesignMetrics(bool b)

Python specific notes:
The object exposes a writable attribute 'useDesignMetrics'. This is the setter.

size

Signature: [const] QSizeF size

Description: Method QSizeF QTextDocument::size()

Python specific notes:
The object exposes a readable attribute 'size'. This is the getter.

staticMetaObject

Signature: [static] QMetaObject staticMetaObject

Description: Obtains the static MetaObject for this class.

textWidth

Signature: [const] double textWidth

Description: Method double QTextDocument::textWidth()

Python specific notes:
The object exposes a readable attribute 'textWidth'. This is the getter.

textWidth=

Signature: void textWidth= (double width)

Description: Method void QTextDocument::setTextWidth(double width)

Python specific notes:
The object exposes a writable attribute 'textWidth'. This is the setter.

timerEvent

Signature: void timerEvent (QTimerEvent ptr event)

Description: Virtual method void QTextDocument::timerEvent(QTimerEvent *event)

This method can be reimplemented in a derived class.

toHtml

Signature: [const] string toHtml (bytes encoding = QByteArray())

Description: Method QString QTextDocument::toHtml(const QByteArray &encoding)

toPlainText

Signature: [const] string toPlainText

Description: Method QString QTextDocument::toPlainText()

toRawText

Signature: [const] string toRawText

Description: Method QString QTextDocument::toRawText()

tr

Signature: [static] string tr (string s, string c = nullptr, int n = -1)

Description: Static method QString QTextDocument::tr(const char *s, const char *c, int n)

This method is static and can be called without an instance.

trUtf8

Signature: [static] string trUtf8 (string s, string c = nullptr, int n = -1)

Description: Static method QString QTextDocument::trUtf8(const char *s, const char *c, int n)

This method is static and can be called without an instance.

undo

(1) Signature: void undo (QTextCursor ptr cursor)

Description: Method void QTextDocument::undo(QTextCursor *cursor)

(2) Signature: void undo

Description: Method void QTextDocument::undo()

undoAvailable

Signature: [signal] void undoAvailable (bool arg1)

Description: Signal declaration for QTextDocument::undoAvailable(bool)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'undoAvailable'. This is the getter.
The object exposes a writable attribute 'undoAvailable'. This is the setter.

undoCommandAdded

Signature: [signal] void undoCommandAdded

Description: Signal declaration for QTextDocument::undoCommandAdded()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'undoCommandAdded'. This is the getter.
The object exposes a writable attribute 'undoCommandAdded'. This is the setter.

undoRedoEnabled

Signature: [const] bool undoRedoEnabled

Description: Method bool QTextDocument::isUndoRedoEnabled()

Python specific notes:
The object exposes a readable attribute 'undoRedoEnabled'. This is the getter.

undoRedoEnabled=

Signature: void undoRedoEnabled= (bool enable)

Description: Method void QTextDocument::setUndoRedoEnabled(bool enable)

Python specific notes:
The object exposes a writable attribute 'undoRedoEnabled'. This is the setter.

useDesignMetrics

Signature: [const] bool useDesignMetrics

Description: Method bool QTextDocument::useDesignMetrics()

Python specific notes:
The object exposes a readable attribute 'useDesignMetrics'. This is the getter.

useDesignMetrics=

Signature: void useDesignMetrics= (bool b)

Description: Method void QTextDocument::setUseDesignMetrics(bool b)

Python specific notes:
The object exposes a writable attribute 'useDesignMetrics'. This is the setter.