Skip to content

PythonQt.QtGui.QTextCursor · declarations 001

Back to PythonQt.QtGui.QTextCursor

BlockUnderCursor instance-attribute

BlockUnderCursor: Any

Document instance-attribute

Document: Any

EndOfBlock instance-attribute

EndOfBlock: Any

EndOfLine instance-attribute

EndOfLine: Any

EndOfWord instance-attribute

EndOfWord: Any

KeepAnchor instance-attribute

KeepAnchor: Any

LineUnderCursor instance-attribute

LineUnderCursor: Any

MoveAnchor instance-attribute

MoveAnchor: Any

MoveMode instance-attribute

MoveMode: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

MoveOperation instance-attribute

MoveOperation: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

NextBlock instance-attribute

NextBlock: Any

NextCell instance-attribute

NextCell: Any

NextCharacter instance-attribute

NextCharacter: Any

NextRow instance-attribute

NextRow: Any

NextWord instance-attribute

NextWord: Any

NoMove instance-attribute

NoMove: Any

PreviousBlock instance-attribute

PreviousBlock: Any

PreviousCell instance-attribute

PreviousCell: Any

PreviousCharacter instance-attribute

PreviousCharacter: Any

PreviousRow instance-attribute

PreviousRow: Any

PreviousWord instance-attribute

PreviousWord: Any

SelectionType instance-attribute

SelectionType: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

Start instance-attribute

Start: Any

StartOfBlock instance-attribute

StartOfBlock: Any

StartOfLine instance-attribute

StartOfLine: Any

StartOfWord instance-attribute

StartOfWord: Any

WordLeft instance-attribute

WordLeft: Any

WordRight instance-attribute

WordRight: Any

WordUnderCursor instance-attribute

WordUnderCursor: Any

anchor

anchor() -> int

X.anchor() -> int

Supplemental documentation: Qt 5 reference:

int QTextCursor::anchor() const

Returns the anchor position; this is the same as position() unless there is a selection in which case position() marks one end of the selection and anchor() marks the other end. Just like the cursor position, the anchor position is between characters.

See also position(), setPosition(), movePosition(), selectionStart(), and selectionEnd().

Upstream PySide2 reference signatures (binding differences may apply):

anchor(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#anchor

atBlockEnd

atBlockEnd() -> bool

X.atBlockEnd() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextCursor::atBlockEnd() const

Returns true if the cursor is at the end of a block; otherwise returns false.

See also atBlockStart() and atEnd().

Upstream PySide2 reference signatures (binding differences may apply):

atBlockEnd(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#atBlockEnd

atBlockStart

atBlockStart() -> bool

X.atBlockStart() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextCursor::atBlockStart() const

Returns true if the cursor is at the start of a block; otherwise returns false.

See also atBlockEnd() and atStart().

Upstream PySide2 reference signatures (binding differences may apply):

atBlockStart(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#atBlockStart

atEnd

atEnd() -> bool

X.atEnd() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextCursor::atEnd() const

Returns true if the cursor is at the end of the document; otherwise returns false.

This function was introduced in Qt 4.6.

See also atStart() and atBlockEnd().

Upstream PySide2 reference signatures (binding differences may apply):

atEnd(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#atEnd

atStart

atStart() -> bool

X.atStart() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextCursor::atStart() const

Returns true if the cursor is at the start of the document; otherwise returns false.

See also atBlockStart() and atEnd().

Upstream PySide2 reference signatures (binding differences may apply):

atStart(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#atStart

beginEditBlock

beginEditBlock() -> None

X.beginEditBlock()

Supplemental documentation: Qt 5 reference:

void QTextCursor::beginEditBlock()

Indicates the start of a block of editing operations on the document that should appear as a single operation from an undo/redo point of view.

For example:

QTextCursor cursor(textDocument);
cursor.beginEditBlock();
cursor.insertText("Hello");
cursor.insertText("World");
cursor.endEditBlock();

textDocument->undo();

The call to undo() will cause both insertions to be undone, causing both "World" and "Hello" to be removed.

It is possible to nest calls to beginEditBlock and endEditBlock. The top-most pair will determine the scope of the undo/redo operation.

See also endEditBlock().

Upstream PySide2 reference signatures (binding differences may apply):

beginEditBlock(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#beginEditBlock

block

block() -> Any

X.block() -> PythonQt.QtGui.QTextBlock

Supplemental documentation: Qt 5 reference:

QTextBlock QTextCursor::block() const

Returns the block that contains the cursor.

Upstream PySide2 reference signatures (binding differences may apply):

block(self) -> PySide2.QtGui.QTextBlock

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#block

blockCharFormat

blockCharFormat() -> Any

X.blockCharFormat() -> PythonQt.QtGui.QTextCharFormat

Supplemental documentation: Qt 5 reference:

QTextCharFormat QTextCursor::blockCharFormat() const

Returns the block character format of the block the cursor is in.

The block char format is the format used when inserting text at the beginning of an empty block.

See also setBlockCharFormat().

Upstream PySide2 reference signatures (binding differences may apply):

blockCharFormat(self) -> PySide2.QtGui.QTextCharFormat

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#blockCharFormat

blockFormat

blockFormat() -> Any

X.blockFormat() -> PythonQt.QtGui.QTextBlockFormat

Supplemental documentation: Qt 5 reference:

QTextBlockFormat QTextCursor::blockFormat() const

Returns the block format of the block the cursor is in.

See also setBlockFormat() and charFormat().

Upstream PySide2 reference signatures (binding differences may apply):

blockFormat(self) -> PySide2.QtGui.QTextBlockFormat

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#blockFormat

blockNumber

blockNumber() -> int

X.blockNumber() -> int

Supplemental documentation: Qt 5 reference:

int QTextCursor::blockNumber() const

Returns the number of the block the cursor is in, or 0 if the cursor is invalid.

Note that this function only makes sense in documents without complex objects such as tables or frames.

This function was introduced in Qt 4.2.

Upstream PySide2 reference signatures (binding differences may apply):

blockNumber(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#blockNumber

charFormat

charFormat() -> Any

X.charFormat() -> PythonQt.QtGui.QTextCharFormat

Supplemental documentation: Qt 5 reference:

QTextCharFormat QTextCursor::charFormat() const

Returns the format of the character immediately before the cursor position(). If the cursor is positioned at the beginning of a text block that is not empty then the format of the character immediately after the cursor is returned.

See also setCharFormat(), insertText(), and blockFormat().

Upstream PySide2 reference signatures (binding differences may apply):

charFormat(self) -> PySide2.QtGui.QTextCharFormat

Source: https://doc.qt.io/archives/qt-5.15/qtextcursor.html#charFormat