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

API reference - Class QTextCursor

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QTextCursor

Sub-classes: MoveMode, QFlags_MoveMode, MoveOperation, QFlags_MoveOperation, SelectionType, QFlags_SelectionType

Public constructors

new QTextCursornewConstructor QTextCursor::QTextCursor()
new QTextCursornew(QTextDocument ptr document)Constructor QTextCursor::QTextCursor(QTextDocument *document)
new QTextCursornew(QTextFrame ptr frame)Constructor QTextCursor::QTextCursor(QTextFrame *frame)
new QTextCursornew(const QTextBlock block)Constructor QTextCursor::QTextCursor(const QTextBlock &block)
new QTextCursornew(const QTextCursor cursor)Constructor QTextCursor::QTextCursor(const QTextCursor &cursor)

Public methods

[const]bool!=(const QTextCursor rhs)Method bool QTextCursor::operator!=(const QTextCursor &rhs)
[const]bool<(const QTextCursor rhs)Method bool QTextCursor::operator<(const QTextCursor &rhs)
[const]bool<=(const QTextCursor rhs)Method bool QTextCursor::operator<=(const QTextCursor &rhs)
[const]bool==(const QTextCursor rhs)Method bool QTextCursor::operator==(const QTextCursor &rhs)
[const]bool>(const QTextCursor rhs)Method bool QTextCursor::operator>(const QTextCursor &rhs)
[const]bool>=(const QTextCursor rhs)Method bool QTextCursor::operator>=(const QTextCursor &rhs)
void_assign(const QTextCursor other)Assigns another object to self
[const]QTextCursor 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.
[const]intanchorMethod int QTextCursor::anchor()
QTextCursorassign(const QTextCursor other)Method QTextCursor &QTextCursor::operator=(const QTextCursor &other)
[const]boolatBlockEndMethod bool QTextCursor::atBlockEnd()
[const]boolatBlockStartMethod bool QTextCursor::atBlockStart()
[const]boolatEndMethod bool QTextCursor::atEnd()
[const]boolatStartMethod bool QTextCursor::atStart()
voidbeginEditBlockMethod void QTextCursor::beginEditBlock()
[const]QTextBlockblockMethod QTextBlock QTextCursor::block()
[const]QTextCharFormatblockCharFormatMethod QTextCharFormat QTextCursor::blockCharFormat()
voidblockCharFormat=(const QTextCharFormat format)Method void QTextCursor::setBlockCharFormat(const QTextCharFormat &format)
[const]QTextBlockFormatblockFormatMethod QTextBlockFormat QTextCursor::blockFormat()
voidblockFormat=(const QTextBlockFormat format)Method void QTextCursor::setBlockFormat(const QTextBlockFormat &format)
[const]intblockNumberMethod int QTextCursor::blockNumber()
[const]QTextCharFormatcharFormatMethod QTextCharFormat QTextCursor::charFormat()
voidcharFormat=(const QTextCharFormat format)Method void QTextCursor::setCharFormat(const QTextCharFormat &format)
voidclearSelectionMethod void QTextCursor::clearSelection()
[const]intcolumnNumberMethod int QTextCursor::columnNumber()
QTextList ptrcreateList(const QTextListFormat format)Method QTextList *QTextCursor::createList(const QTextListFormat &format)
QTextList ptrcreateList(const QTextListFormat_Style style)Method QTextList *QTextCursor::createList(QTextListFormat::Style style)
[const]QTextFrame ptrcurrentFrameMethod QTextFrame *QTextCursor::currentFrame()
[const]QTextList ptrcurrentListMethod QTextList *QTextCursor::currentList()
[const]QTextTable ptrcurrentTableMethod QTextTable *QTextCursor::currentTable()
voiddeleteCharMethod void QTextCursor::deleteChar()
voiddeletePreviousCharMethod void QTextCursor::deletePreviousChar()
[const]QTextDocument ptrdocumentMethod QTextDocument *QTextCursor::document()
[const]new QTextCursor ptrdupCreates a copy of self
voidendEditBlockMethod void QTextCursor::endEditBlock()
[const]boolhasComplexSelectionMethod bool QTextCursor::hasComplexSelection()
[const]boolhasSelectionMethod bool QTextCursor::hasSelection()
voidinsertBlockMethod void QTextCursor::insertBlock()
voidinsertBlock(const QTextBlockFormat format)Method void QTextCursor::insertBlock(const QTextBlockFormat &format)
voidinsertBlock(const QTextBlockFormat format,
const QTextCharFormat charFormat)
Method void QTextCursor::insertBlock(const QTextBlockFormat &format, const QTextCharFormat &charFormat)
voidinsertFragment(const QTextDocumentFragment fragment)Method void QTextCursor::insertFragment(const QTextDocumentFragment &fragment)
QTextFrame ptrinsertFrame(const QTextFrameFormat format)Method QTextFrame *QTextCursor::insertFrame(const QTextFrameFormat &format)
voidinsertHtml(string html)Method void QTextCursor::insertHtml(const QString &html)
voidinsertImage(const QTextImageFormat format,
const QTextFrameFormat_Position alignment)
Method void QTextCursor::insertImage(const QTextImageFormat &format, QTextFrameFormat::Position alignment)
voidinsertImage(const QTextImageFormat format)Method void QTextCursor::insertImage(const QTextImageFormat &format)
voidinsertImage(string name)Method void QTextCursor::insertImage(const QString &name)
voidinsertImage(const QImage image,
string name = QString())
Method void QTextCursor::insertImage(const QImage &image, const QString &name)
QTextList ptrinsertList(const QTextListFormat format)Method QTextList *QTextCursor::insertList(const QTextListFormat &format)
QTextList ptrinsertList(const QTextListFormat_Style style)Method QTextList *QTextCursor::insertList(QTextListFormat::Style style)
QTextTable ptrinsertTable(int rows,
int cols,
const QTextTableFormat format)
Method QTextTable *QTextCursor::insertTable(int rows, int cols, const QTextTableFormat &format)
QTextTable ptrinsertTable(int rows,
int cols)
Method QTextTable *QTextCursor::insertTable(int rows, int cols)
voidinsertText(string text)Method void QTextCursor::insertText(const QString &text)
voidinsertText(string text,
const QTextCharFormat format)
Method void QTextCursor::insertText(const QString &text, const QTextCharFormat &format)
[const]boolisCopyOf?(const QTextCursor other)Method bool QTextCursor::isCopyOf(const QTextCursor &other)
[const]boolisNull?Method bool QTextCursor::isNull()
voidjoinPreviousEditBlockMethod void QTextCursor::joinPreviousEditBlock()
[const]boolkeepPositionOnInsertMethod bool QTextCursor::keepPositionOnInsert()
voidkeepPositionOnInsert=(bool b)Method void QTextCursor::setKeepPositionOnInsert(bool b)
voidmergeBlockCharFormat(const QTextCharFormat modifier)Method void QTextCursor::mergeBlockCharFormat(const QTextCharFormat &modifier)
voidmergeBlockFormat(const QTextBlockFormat modifier)Method void QTextCursor::mergeBlockFormat(const QTextBlockFormat &modifier)
voidmergeCharFormat(const QTextCharFormat modifier)Method void QTextCursor::mergeCharFormat(const QTextCharFormat &modifier)
boolmovePosition(const QTextCursor_MoveOperation op,
const QTextCursor_MoveMode arg2 = QTextCursor::MoveAnchor,
int n = 1)
Method bool QTextCursor::movePosition(QTextCursor::MoveOperation op, QTextCursor::MoveMode, int n)
[const]intpositionMethod int QTextCursor::position()
[const]intpositionInBlockMethod int QTextCursor::positionInBlock()
voidremoveSelectedTextMethod void QTextCursor::removeSelectedText()
voidselect(const QTextCursor_SelectionType selection)Method void QTextCursor::select(QTextCursor::SelectionType selection)
[const]voidselectedTableCells(int ptr firstRow,
int ptr numRows,
int ptr firstColumn,
int ptr numColumns)
Method void QTextCursor::selectedTableCells(int *firstRow, int *numRows, int *firstColumn, int *numColumns)
[const]stringselectedTextMethod QString QTextCursor::selectedText()
[const]QTextDocumentFragmentselectionMethod QTextDocumentFragment QTextCursor::selection()
[const]intselectionEndMethod int QTextCursor::selectionEnd()
[const]intselectionStartMethod int QTextCursor::selectionStart()
voidsetBlockCharFormat(const QTextCharFormat format)Method void QTextCursor::setBlockCharFormat(const QTextCharFormat &format)
voidsetBlockFormat(const QTextBlockFormat format)Method void QTextCursor::setBlockFormat(const QTextBlockFormat &format)
voidsetCharFormat(const QTextCharFormat format)Method void QTextCursor::setCharFormat(const QTextCharFormat &format)
voidsetKeepPositionOnInsert(bool b)Method void QTextCursor::setKeepPositionOnInsert(bool b)
voidsetPosition(int pos,
const QTextCursor_MoveMode mode = QTextCursor::MoveAnchor)
Method void QTextCursor::setPosition(int pos, QTextCursor::MoveMode mode)
voidsetVerticalMovementX(int x)Method void QTextCursor::setVerticalMovementX(int x)
voidsetVisualNavigation(bool b)Method void QTextCursor::setVisualNavigation(bool b)
voidswap(QTextCursor other)Method void QTextCursor::swap(QTextCursor &other)
[const]intverticalMovementXMethod int QTextCursor::verticalMovementX()
voidverticalMovementX=(int x)Method void QTextCursor::setVerticalMovementX(int x)
[const]boolvisualNavigationMethod bool QTextCursor::visualNavigation()
voidvisualNavigation=(bool b)Method void QTextCursor::setVisualNavigation(bool b)

Public static methods and constants

[static,const]QTextCursor_SelectionTypeBlockUnderCursorEnum constant QTextCursor::BlockUnderCursor
[static,const]QTextCursor_SelectionTypeDocumentEnum constant QTextCursor::Document
[static,const]QTextCursor_MoveOperationDownEnum constant QTextCursor::Down
[static,const]QTextCursor_MoveOperationEndEnum constant QTextCursor::End
[static,const]QTextCursor_MoveOperationEndOfBlockEnum constant QTextCursor::EndOfBlock
[static,const]QTextCursor_MoveOperationEndOfLineEnum constant QTextCursor::EndOfLine
[static,const]QTextCursor_MoveOperationEndOfWordEnum constant QTextCursor::EndOfWord
[static,const]QTextCursor_MoveModeKeepAnchorEnum constant QTextCursor::KeepAnchor
[static,const]QTextCursor_MoveOperationLeftEnum constant QTextCursor::Left
[static,const]QTextCursor_SelectionTypeLineUnderCursorEnum constant QTextCursor::LineUnderCursor
[static,const]QTextCursor_MoveModeMoveAnchorEnum constant QTextCursor::MoveAnchor
[static,const]QTextCursor_MoveOperationNextBlockEnum constant QTextCursor::NextBlock
[static,const]QTextCursor_MoveOperationNextCellEnum constant QTextCursor::NextCell
[static,const]QTextCursor_MoveOperationNextCharacterEnum constant QTextCursor::NextCharacter
[static,const]QTextCursor_MoveOperationNextRowEnum constant QTextCursor::NextRow
[static,const]QTextCursor_MoveOperationNextWordEnum constant QTextCursor::NextWord
[static,const]QTextCursor_MoveOperationNoMoveEnum constant QTextCursor::NoMove
[static,const]QTextCursor_MoveOperationPreviousBlockEnum constant QTextCursor::PreviousBlock
[static,const]QTextCursor_MoveOperationPreviousCellEnum constant QTextCursor::PreviousCell
[static,const]QTextCursor_MoveOperationPreviousCharacterEnum constant QTextCursor::PreviousCharacter
[static,const]QTextCursor_MoveOperationPreviousRowEnum constant QTextCursor::PreviousRow
[static,const]QTextCursor_MoveOperationPreviousWordEnum constant QTextCursor::PreviousWord
[static,const]QTextCursor_MoveOperationRightEnum constant QTextCursor::Right
[static,const]QTextCursor_MoveOperationStartEnum constant QTextCursor::Start
[static,const]QTextCursor_MoveOperationStartOfBlockEnum constant QTextCursor::StartOfBlock
[static,const]QTextCursor_MoveOperationStartOfLineEnum constant QTextCursor::StartOfLine
[static,const]QTextCursor_MoveOperationStartOfWordEnum constant QTextCursor::StartOfWord
[static,const]QTextCursor_MoveOperationUpEnum constant QTextCursor::Up
[static,const]QTextCursor_MoveOperationWordLeftEnum constant QTextCursor::WordLeft
[static,const]QTextCursor_MoveOperationWordRightEnum constant QTextCursor::WordRight
[static,const]QTextCursor_SelectionTypeWordUnderCursorEnum constant QTextCursor::WordUnderCursor

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

!=

Signature: [const] bool != (const QTextCursor rhs)

Description: Method bool QTextCursor::operator!=(const QTextCursor &rhs)

<

Signature: [const] bool < (const QTextCursor rhs)

Description: Method bool QTextCursor::operator<(const QTextCursor &rhs)

<=

Signature: [const] bool <= (const QTextCursor rhs)

Description: Method bool QTextCursor::operator<=(const QTextCursor &rhs)

==

Signature: [const] bool == (const QTextCursor rhs)

Description: Method bool QTextCursor::operator==(const QTextCursor &rhs)

>

Signature: [const] bool > (const QTextCursor rhs)

Description: Method bool QTextCursor::operator>(const QTextCursor &rhs)

>=

Signature: [const] bool >= (const QTextCursor rhs)

Description: Method bool QTextCursor::operator>=(const QTextCursor &rhs)

BlockUnderCursor

Signature: [static,const] QTextCursor_SelectionType BlockUnderCursor

Description: Enum constant QTextCursor::BlockUnderCursor

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

Document

Signature: [static,const] QTextCursor_SelectionType Document

Description: Enum constant QTextCursor::Document

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

Down

Signature: [static,const] QTextCursor_MoveOperation Down

Description: Enum constant QTextCursor::Down

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

End

Signature: [static,const] QTextCursor_MoveOperation End

Description: Enum constant QTextCursor::End

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

EndOfBlock

Signature: [static,const] QTextCursor_MoveOperation EndOfBlock

Description: Enum constant QTextCursor::EndOfBlock

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

EndOfLine

Signature: [static,const] QTextCursor_MoveOperation EndOfLine

Description: Enum constant QTextCursor::EndOfLine

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

EndOfWord

Signature: [static,const] QTextCursor_MoveOperation EndOfWord

Description: Enum constant QTextCursor::EndOfWord

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

KeepAnchor

Signature: [static,const] QTextCursor_MoveMode KeepAnchor

Description: Enum constant QTextCursor::KeepAnchor

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

Left

Signature: [static,const] QTextCursor_MoveOperation Left

Description: Enum constant QTextCursor::Left

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

LineUnderCursor

Signature: [static,const] QTextCursor_SelectionType LineUnderCursor

Description: Enum constant QTextCursor::LineUnderCursor

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

MoveAnchor

Signature: [static,const] QTextCursor_MoveMode MoveAnchor

Description: Enum constant QTextCursor::MoveAnchor

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

NextBlock

Signature: [static,const] QTextCursor_MoveOperation NextBlock

Description: Enum constant QTextCursor::NextBlock

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

NextCell

Signature: [static,const] QTextCursor_MoveOperation NextCell

Description: Enum constant QTextCursor::NextCell

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

NextCharacter

Signature: [static,const] QTextCursor_MoveOperation NextCharacter

Description: Enum constant QTextCursor::NextCharacter

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

NextRow

Signature: [static,const] QTextCursor_MoveOperation NextRow

Description: Enum constant QTextCursor::NextRow

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

NextWord

Signature: [static,const] QTextCursor_MoveOperation NextWord

Description: Enum constant QTextCursor::NextWord

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

NoMove

Signature: [static,const] QTextCursor_MoveOperation NoMove

Description: Enum constant QTextCursor::NoMove

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

PreviousBlock

Signature: [static,const] QTextCursor_MoveOperation PreviousBlock

Description: Enum constant QTextCursor::PreviousBlock

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

PreviousCell

Signature: [static,const] QTextCursor_MoveOperation PreviousCell

Description: Enum constant QTextCursor::PreviousCell

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

PreviousCharacter

Signature: [static,const] QTextCursor_MoveOperation PreviousCharacter

Description: Enum constant QTextCursor::PreviousCharacter

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

PreviousRow

Signature: [static,const] QTextCursor_MoveOperation PreviousRow

Description: Enum constant QTextCursor::PreviousRow

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

PreviousWord

Signature: [static,const] QTextCursor_MoveOperation PreviousWord

Description: Enum constant QTextCursor::PreviousWord

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

Right

Signature: [static,const] QTextCursor_MoveOperation Right

Description: Enum constant QTextCursor::Right

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

Start

Signature: [static,const] QTextCursor_MoveOperation Start

Description: Enum constant QTextCursor::Start

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

StartOfBlock

Signature: [static,const] QTextCursor_MoveOperation StartOfBlock

Description: Enum constant QTextCursor::StartOfBlock

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

StartOfLine

Signature: [static,const] QTextCursor_MoveOperation StartOfLine

Description: Enum constant QTextCursor::StartOfLine

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

StartOfWord

Signature: [static,const] QTextCursor_MoveOperation StartOfWord

Description: Enum constant QTextCursor::StartOfWord

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

Up

Signature: [static,const] QTextCursor_MoveOperation Up

Description: Enum constant QTextCursor::Up

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

WordLeft

Signature: [static,const] QTextCursor_MoveOperation WordLeft

Description: Enum constant QTextCursor::WordLeft

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

WordRight

Signature: [static,const] QTextCursor_MoveOperation WordRight

Description: Enum constant QTextCursor::WordRight

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

WordUnderCursor

Signature: [static,const] QTextCursor_SelectionType WordUnderCursor

Description: Enum constant QTextCursor::WordUnderCursor

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

_assign

Signature: void _assign (const QTextCursor other)

Description: Assigns another object to self

_const_cast

Signature: [const] QTextCursor 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.

anchor

Signature: [const] int anchor

Description: Method int QTextCursor::anchor()

assign

Signature: QTextCursor assign (const QTextCursor other)

Description: Method QTextCursor &QTextCursor::operator=(const QTextCursor &other)

atBlockEnd

Signature: [const] bool atBlockEnd

Description: Method bool QTextCursor::atBlockEnd()

atBlockStart

Signature: [const] bool atBlockStart

Description: Method bool QTextCursor::atBlockStart()

atEnd

Signature: [const] bool atEnd

Description: Method bool QTextCursor::atEnd()

atStart

Signature: [const] bool atStart

Description: Method bool QTextCursor::atStart()

beginEditBlock

Signature: void beginEditBlock

Description: Method void QTextCursor::beginEditBlock()

block

Signature: [const] QTextBlock block

Description: Method QTextBlock QTextCursor::block()

blockCharFormat

Signature: [const] QTextCharFormat blockCharFormat

Description: Method QTextCharFormat QTextCursor::blockCharFormat()

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

blockCharFormat=

Signature: void blockCharFormat= (const QTextCharFormat format)

Description: Method void QTextCursor::setBlockCharFormat(const QTextCharFormat &format)

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

blockFormat

Signature: [const] QTextBlockFormat blockFormat

Description: Method QTextBlockFormat QTextCursor::blockFormat()

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

blockFormat=

Signature: void blockFormat= (const QTextBlockFormat format)

Description: Method void QTextCursor::setBlockFormat(const QTextBlockFormat &format)

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

blockNumber

Signature: [const] int blockNumber

Description: Method int QTextCursor::blockNumber()

charFormat

Signature: [const] QTextCharFormat charFormat

Description: Method QTextCharFormat QTextCursor::charFormat()

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

charFormat=

Signature: void charFormat= (const QTextCharFormat format)

Description: Method void QTextCursor::setCharFormat(const QTextCharFormat &format)

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

clearSelection

Signature: void clearSelection

Description: Method void QTextCursor::clearSelection()

columnNumber

Signature: [const] int columnNumber

Description: Method int QTextCursor::columnNumber()

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

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.

createList

(1) Signature: QTextList ptr createList (const QTextListFormat format)

Description: Method QTextList *QTextCursor::createList(const QTextListFormat &format)

(2) Signature: QTextList ptr createList (const QTextListFormat_Style style)

Description: Method QTextList *QTextCursor::createList(QTextListFormat::Style style)

currentFrame

Signature: [const] QTextFrame ptr currentFrame

Description: Method QTextFrame *QTextCursor::currentFrame()

currentList

Signature: [const] QTextList ptr currentList

Description: Method QTextList *QTextCursor::currentList()

currentTable

Signature: [const] QTextTable ptr currentTable

Description: Method QTextTable *QTextCursor::currentTable()

deleteChar

Signature: void deleteChar

Description: Method void QTextCursor::deleteChar()

deletePreviousChar

Signature: void deletePreviousChar

Description: Method void QTextCursor::deletePreviousChar()

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

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

Use of this method is deprecated. Use _destroyed? instead

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.

document

Signature: [const] QTextDocument ptr document

Description: Method QTextDocument *QTextCursor::document()

dup

Signature: [const] new QTextCursor ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

endEditBlock

Signature: void endEditBlock

Description: Method void QTextCursor::endEditBlock()

hasComplexSelection

Signature: [const] bool hasComplexSelection

Description: Method bool QTextCursor::hasComplexSelection()

hasSelection

Signature: [const] bool hasSelection

Description: Method bool QTextCursor::hasSelection()

insertBlock

(1) Signature: void insertBlock

Description: Method void QTextCursor::insertBlock()

(2) Signature: void insertBlock (const QTextBlockFormat format)

Description: Method void QTextCursor::insertBlock(const QTextBlockFormat &format)

(3) Signature: void insertBlock (const QTextBlockFormat format, const QTextCharFormat charFormat)

Description: Method void QTextCursor::insertBlock(const QTextBlockFormat &format, const QTextCharFormat &charFormat)

insertFragment

Signature: void insertFragment (const QTextDocumentFragment fragment)

Description: Method void QTextCursor::insertFragment(const QTextDocumentFragment &fragment)

insertFrame

Signature: QTextFrame ptr insertFrame (const QTextFrameFormat format)

Description: Method QTextFrame *QTextCursor::insertFrame(const QTextFrameFormat &format)

insertHtml

Signature: void insertHtml (string html)

Description: Method void QTextCursor::insertHtml(const QString &html)

insertImage

(1) Signature: void insertImage (const QTextImageFormat format, const QTextFrameFormat_Position alignment)

Description: Method void QTextCursor::insertImage(const QTextImageFormat &format, QTextFrameFormat::Position alignment)

(2) Signature: void insertImage (const QTextImageFormat format)

Description: Method void QTextCursor::insertImage(const QTextImageFormat &format)

(3) Signature: void insertImage (string name)

Description: Method void QTextCursor::insertImage(const QString &name)

(4) Signature: void insertImage (const QImage image, string name = QString())

Description: Method void QTextCursor::insertImage(const QImage &image, const QString &name)

insertList

(1) Signature: QTextList ptr insertList (const QTextListFormat format)

Description: Method QTextList *QTextCursor::insertList(const QTextListFormat &format)

(2) Signature: QTextList ptr insertList (const QTextListFormat_Style style)

Description: Method QTextList *QTextCursor::insertList(QTextListFormat::Style style)

insertTable

(1) Signature: QTextTable ptr insertTable (int rows, int cols, const QTextTableFormat format)

Description: Method QTextTable *QTextCursor::insertTable(int rows, int cols, const QTextTableFormat &format)

(2) Signature: QTextTable ptr insertTable (int rows, int cols)

Description: Method QTextTable *QTextCursor::insertTable(int rows, int cols)

insertText

(1) Signature: void insertText (string text)

Description: Method void QTextCursor::insertText(const QString &text)

(2) Signature: void insertText (string text, const QTextCharFormat format)

Description: Method void QTextCursor::insertText(const QString &text, const QTextCharFormat &format)

isCopyOf?

Signature: [const] bool isCopyOf? (const QTextCursor other)

Description: Method bool QTextCursor::isCopyOf(const QTextCursor &other)

isNull?

Signature: [const] bool isNull?

Description: Method bool QTextCursor::isNull()

is_const_object?

Signature: [const] bool is_const_object?

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

Use of this method is deprecated. Use _is_const_object? instead

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

joinPreviousEditBlock

Signature: void joinPreviousEditBlock

Description: Method void QTextCursor::joinPreviousEditBlock()

keepPositionOnInsert

Signature: [const] bool keepPositionOnInsert

Description: Method bool QTextCursor::keepPositionOnInsert()

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

keepPositionOnInsert=

Signature: void keepPositionOnInsert= (bool b)

Description: Method void QTextCursor::setKeepPositionOnInsert(bool b)

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

mergeBlockCharFormat

Signature: void mergeBlockCharFormat (const QTextCharFormat modifier)

Description: Method void QTextCursor::mergeBlockCharFormat(const QTextCharFormat &modifier)

mergeBlockFormat

Signature: void mergeBlockFormat (const QTextBlockFormat modifier)

Description: Method void QTextCursor::mergeBlockFormat(const QTextBlockFormat &modifier)

mergeCharFormat

Signature: void mergeCharFormat (const QTextCharFormat modifier)

Description: Method void QTextCursor::mergeCharFormat(const QTextCharFormat &modifier)

movePosition

Signature: bool movePosition (const QTextCursor_MoveOperation op, const QTextCursor_MoveMode arg2 = QTextCursor::MoveAnchor, int n = 1)

Description: Method bool QTextCursor::movePosition(QTextCursor::MoveOperation op, QTextCursor::MoveMode, int n)

new

(1) Signature: [static] new QTextCursor new

Description: Constructor QTextCursor::QTextCursor()

This method creates an object of class QTextCursor.

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

(2) Signature: [static] new QTextCursor new (QTextDocument ptr document)

Description: Constructor QTextCursor::QTextCursor(QTextDocument *document)

This method creates an object of class QTextCursor.

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

(3) Signature: [static] new QTextCursor new (QTextFrame ptr frame)

Description: Constructor QTextCursor::QTextCursor(QTextFrame *frame)

This method creates an object of class QTextCursor.

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

(4) Signature: [static] new QTextCursor new (const QTextBlock block)

Description: Constructor QTextCursor::QTextCursor(const QTextBlock &block)

This method creates an object of class QTextCursor.

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

(5) Signature: [static] new QTextCursor new (const QTextCursor cursor)

Description: Constructor QTextCursor::QTextCursor(const QTextCursor &cursor)

This method creates an object of class QTextCursor.

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

position

Signature: [const] int position

Description: Method int QTextCursor::position()

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

positionInBlock

Signature: [const] int positionInBlock

Description: Method int QTextCursor::positionInBlock()

removeSelectedText

Signature: void removeSelectedText

Description: Method void QTextCursor::removeSelectedText()

select

Signature: void select (const QTextCursor_SelectionType selection)

Description: Method void QTextCursor::select(QTextCursor::SelectionType selection)

selectedTableCells

Signature: [const] void selectedTableCells (int ptr firstRow, int ptr numRows, int ptr firstColumn, int ptr numColumns)

Description: Method void QTextCursor::selectedTableCells(int *firstRow, int *numRows, int *firstColumn, int *numColumns)

selectedText

Signature: [const] string selectedText

Description: Method QString QTextCursor::selectedText()

selection

Signature: [const] QTextDocumentFragment selection

Description: Method QTextDocumentFragment QTextCursor::selection()

selectionEnd

Signature: [const] int selectionEnd

Description: Method int QTextCursor::selectionEnd()

selectionStart

Signature: [const] int selectionStart

Description: Method int QTextCursor::selectionStart()

setBlockCharFormat

Signature: void setBlockCharFormat (const QTextCharFormat format)

Description: Method void QTextCursor::setBlockCharFormat(const QTextCharFormat &format)

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

setBlockFormat

Signature: void setBlockFormat (const QTextBlockFormat format)

Description: Method void QTextCursor::setBlockFormat(const QTextBlockFormat &format)

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

setCharFormat

Signature: void setCharFormat (const QTextCharFormat format)

Description: Method void QTextCursor::setCharFormat(const QTextCharFormat &format)

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

setKeepPositionOnInsert

Signature: void setKeepPositionOnInsert (bool b)

Description: Method void QTextCursor::setKeepPositionOnInsert(bool b)

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

setPosition

Signature: void setPosition (int pos, const QTextCursor_MoveMode mode = QTextCursor::MoveAnchor)

Description: Method void QTextCursor::setPosition(int pos, QTextCursor::MoveMode mode)

setVerticalMovementX

Signature: void setVerticalMovementX (int x)

Description: Method void QTextCursor::setVerticalMovementX(int x)

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

setVisualNavigation

Signature: void setVisualNavigation (bool b)

Description: Method void QTextCursor::setVisualNavigation(bool b)

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

swap

Signature: void swap (QTextCursor other)

Description: Method void QTextCursor::swap(QTextCursor &other)

verticalMovementX

Signature: [const] int verticalMovementX

Description: Method int QTextCursor::verticalMovementX()

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

verticalMovementX=

Signature: void verticalMovementX= (int x)

Description: Method void QTextCursor::setVerticalMovementX(int x)

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

visualNavigation

Signature: [const] bool visualNavigation

Description: Method bool QTextCursor::visualNavigation()

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

visualNavigation=

Signature: void visualNavigation= (bool b)

Description: Method void QTextCursor::setVisualNavigation(bool b)

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