Skip to content

PythonQt.QtCore.QTextBoundaryFinder

QTextBoundaryFinder

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

QTextBoundaryFinder allows to find Unicode text boundaries in a string, accordingly to the Unicode text boundary specification (see [Unicode Standard Annex

14](https://www.unicode.org/reports/tr14/) and [Unicode Standard Annex

29](https://www.unicode.org/reports/tr29/)).

QTextBoundaryFinder can operate on a QString in four possible modes depending on the value of BoundaryType.

Units of Unicode characters that make up what the user thinks of as a character or basic unit of the language are here called Grapheme clusters. The two unicode characters 'A' + diaeresis do for example form one grapheme cluster as the user thinks of them as one character, yet it is in this case represented by two unicode code points (see https://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries).

Word boundaries are there to locate the start and end of what a language considers to be a word (see https://www.unicode.org/reports/tr29/#Word_Boundaries).

Line break boundaries give possible places where a line break might happen and sentence boundaries will show the beginning and end of whole sentences (see https://www.unicode.org/reports/tr29/#Sentence_Boundaries and https://www.unicode.org/reports/tr14/).

The first position in a string is always a valid boundary and refers to the position before the first character. The last position at the length of the string is also valid and refers to the position after the last character.

Source: https://doc.qt.io/archives/qt-5.15/qtextboundaryfinder.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
BoundaryReason attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
BoundaryReasons attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
BoundaryType attribute type Convert a number or string to an integer, or return 0 if no arguments are given.
BreakOpportunity attribute Any
EndOfItem attribute Any
Grapheme attribute Any
Line attribute Any
MandatoryBreak attribute Any
NotAtBoundary attribute Any
Sentence attribute Any
SoftHyphen attribute Any
StartOfItem attribute Any
Word attribute Any
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
boundaryReasons function (self) -> Any Returns the reasons for the boundary finder to have chosen the current position as a boundary.
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
isAtBoundary function (self) -> bool X.isAtBoundary() -> bool
isValid function (self) -> bool X.isValid() -> bool
position function (self) -> int X.position() -> int
setPosition function (self, position: int) -> None Sets the current position of the [QTextBoundaryFinder](https://doc.qt.io/archives/qt-5.15/qtextboundaryfinder.html) to position.
string function (self) -> str X.string() -> str
toEnd function (self) -> None Moves the finder to the end of the string.
toNextBoundary function (self) -> int X.toNextBoundary() -> int
toPreviousBoundary function (self) -> int X.toPreviousBoundary() -> int
toStart function (self) -> None Moves the finder to the start of the string.
type function (self) -> Any Returns the type of the [QTextBoundaryFinder](https://doc.qt.io/archives/qt-5.15/qtextboundaryfinder.html).