Skip to content

PythonQt.QtGui.QTextFormat · declarations 001

Back to PythonQt.QtGui.QTextFormat

background

background() -> Any

X.background() -> PythonQt.QtGui.QBrush

Supplemental documentation: Qt 5 reference:

QBrush QTextFormat::background() const

Returns the brush used to paint the document's background.

See also setBackground(), clearBackground(), and foreground().

Upstream PySide2 reference signatures (binding differences may apply):

background(self) -> PySide2.QtGui.QBrush

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#background

boolProperty

boolProperty(propertyId: int) -> bool

X.boolProperty(propertyId) -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::boolProperty(int propertyId) const

Returns the value of the property specified by propertyId. If the property isn't of QTextFormat::Bool type, false is returned instead.

See also setProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

boolProperty(self, propertyId: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#boolProperty

brushProperty

brushProperty(propertyId: int) -> Any

X.brushProperty(propertyId) -> PythonQt.QtGui.QBrush

Supplemental documentation: Qt 5 reference:

QBrush QTextFormat::brushProperty(int propertyId) const

Returns the value of the property given by propertyId; if the property isn't of QVariant::Brush type, Qt::NoBrush is returned instead.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

brushProperty(self, propertyId: int) -> PySide2.QtGui.QBrush

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#brushProperty

clearBackground

clearBackground() -> None

X.clearBackground()

Supplemental documentation: Qt 5 reference:

void QTextFormat::clearBackground()

Clears the brush used to paint the document's background. The default brush will be used.

See also background(), setBackground(), and clearForeground().

Upstream PySide2 reference signatures (binding differences may apply):

clearBackground(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#clearBackground

clearForeground

clearForeground() -> None

X.clearForeground()

Supplemental documentation: Qt 5 reference:

void QTextFormat::clearForeground()

Clears the brush used to paint the document's foreground. The default brush will be used.

See also foreground(), setForeground(), and clearBackground().

Upstream PySide2 reference signatures (binding differences may apply):

clearForeground(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#clearForeground

clearProperty

clearProperty(propertyId: int) -> None

X.clearProperty(propertyId)

Supplemental documentation: Qt 5 reference:

void QTextFormat::clearProperty(int propertyId)

Clears the value of the property given by propertyId

See also Property.

Upstream PySide2 reference signatures (binding differences may apply):

clearProperty(self, propertyId: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#clearProperty

colorProperty

colorProperty(propertyId: int) -> Any

X.colorProperty(propertyId) -> PythonQt.QtGui.QColor

Supplemental documentation: Qt 5 reference:

QColor QTextFormat::colorProperty(int propertyId) const

Returns the value of the property given by propertyId; if the property isn't of QVariant::Color type, an invalid color is returned instead.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

colorProperty(self, propertyId: int) -> PySide2.QtGui.QColor

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#colorProperty

doubleProperty

doubleProperty(propertyId: int) -> float

X.doubleProperty(propertyId) -> float

Supplemental documentation: Qt 5 reference:

qreal QTextFormat::doubleProperty(int propertyId) const

Returns the value of the property specified by propertyId. If the property isn't of QVariant::Double or QMetaType::Float type, 0 is returned instead.

See also setProperty(), boolProperty(), intProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

doubleProperty(self, propertyId: int) -> float

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#doubleProperty

foreground

foreground() -> Any

X.foreground() -> PythonQt.QtGui.QBrush

Supplemental documentation: Qt 5 reference:

QBrush QTextFormat::foreground() const

Returns the brush used to render foreground details, such as text, frame outlines, and table borders.

See also setForeground(), clearForeground(), and background().

Upstream PySide2 reference signatures (binding differences may apply):

foreground(self) -> PySide2.QtGui.QBrush

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#foreground

hasProperty

hasProperty(propertyId: int) -> bool

X.hasProperty(propertyId) -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::hasProperty(int propertyId) const

Returns true if the text format has a property with the given propertyId; otherwise returns false.

See also properties() and Property.

Upstream PySide2 reference signatures (binding differences may apply):

hasProperty(self, propertyId: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#hasProperty

intProperty

intProperty(propertyId: int) -> int

X.intProperty(propertyId) -> int

Supplemental documentation: Qt 5 reference:

int QTextFormat::intProperty(int propertyId) const

Returns the value of the property specified by propertyId. If the property is not of QTextFormat::Integer type, 0 is returned instead.

See also setProperty(), boolProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

intProperty(self, propertyId: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#intProperty

isBlockFormat

isBlockFormat() -> bool

X.isBlockFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isBlockFormat() const

Returns true if this text format is a BlockFormat; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isBlockFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isBlockFormat

isCharFormat

isCharFormat() -> bool

X.isCharFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isCharFormat() const

Returns true if this text format is a CharFormat; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isCharFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isCharFormat

isEmpty

isEmpty() -> bool

X.isEmpty() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isEmpty() const

Returns true if the format does not store any properties; false otherwise.

This function was introduced in Qt 5.3.

See also propertyCount() and properties().

Upstream PySide2 reference signatures (binding differences may apply):

isEmpty(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isEmpty

isFrameFormat

isFrameFormat() -> bool

X.isFrameFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isFrameFormat() const

Returns true if this text format is a FrameFormat; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isFrameFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isFrameFormat

isImageFormat

isImageFormat() -> bool

X.isImageFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isImageFormat() const

Returns true if this text format is an image format; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isImageFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isImageFormat

isListFormat

isListFormat() -> bool

X.isListFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isListFormat() const

Returns true if this text format is a ListFormat; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isListFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isListFormat

isTableCellFormat

isTableCellFormat() -> bool

X.isTableCellFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isTableCellFormat() const

Returns true if this text format is a TableCellFormat; otherwise returns false.

This function was introduced in Qt 4.4.

Upstream PySide2 reference signatures (binding differences may apply):

isTableCellFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isTableCellFormat

isTableFormat

isTableFormat() -> bool

X.isTableFormat() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isTableFormat() const

Returns true if this text format is a TableFormat; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isTableFormat(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isTableFormat

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QTextFormat::isValid() const

Returns true if the format is valid (i.e. is not InvalidFormat); otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#isValid

layoutDirection

layoutDirection() -> Any

X.layoutDirection()

Supplemental documentation: Qt 5 reference:

Qt::LayoutDirection QTextFormat::layoutDirection() const

Returns the document's layout direction.

See also setLayoutDirection().

Upstream PySide2 reference signatures (binding differences may apply):

layoutDirection(self) -> PySide2.QtCore.Qt.LayoutDirection

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#layoutDirection

lengthProperty

lengthProperty(propertyId: int) -> Any

X.lengthProperty(propertyId) -> PythonQt.QtGui.QTextLength

Supplemental documentation: Qt 5 reference:

QTextLength QTextFormat::lengthProperty(int propertyId) const

Returns the value of the property given by propertyId.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

lengthProperty(self, propertyId: int) -> PySide2.QtGui.QTextLength

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#lengthProperty

lengthVectorProperty

lengthVectorProperty(propertyId: int) -> tuple

X.lengthVectorProperty(propertyId) -> tuple

Supplemental documentation: Qt 5 reference:

QVector\<QTextLength> QTextFormat::lengthVectorProperty(int propertyId) const

Returns the value of the property given by propertyId. If the property isn't of QTextFormat::LengthVector type, an empty length vector is returned instead.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), colorProperty(), lengthProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

lengthVectorProperty(self, propertyId: int) -> typing.List[PySide2.QtGui.QTextLength]

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#lengthVectorProperty

merge

merge(other: Any) -> None

X.merge(other)

Supplemental documentation: Qt 5 reference:

void QTextFormat::merge(const QTextFormat \&other)

Merges the other format with this format; where there are conflicts the other format takes precedence.

Upstream PySide2 reference signatures (binding differences may apply):

merge(self, other: PySide2.QtGui.QTextFormat) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#merge

objectIndex

objectIndex() -> int

X.objectIndex() -> int

Supplemental documentation: Qt 5 reference:

int QTextFormat::objectIndex() const

Returns the index of the format object, or -1 if the format object is invalid.

See also setObjectIndex().

Upstream PySide2 reference signatures (binding differences may apply):

objectIndex(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#objectIndex

objectType

objectType() -> int

X.objectType() -> int

Supplemental documentation: Qt 5 reference:

int QTextFormat::objectType() const

Returns the text format's object type.

See also ObjectTypes and setObjectType().

Upstream PySide2 reference signatures (binding differences may apply):

objectType(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#objectType

penProperty

penProperty(propertyId: int) -> Any

X.penProperty(propertyId) -> PythonQt.QtGui.QPen

Supplemental documentation: Qt 5 reference:

QPen QTextFormat::penProperty(int propertyId) const

Returns the value of the property given by propertyId; if the property isn't of QVariant::Pen type, Qt::NoPen is returned instead.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), stringProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

penProperty(self, propertyId: int) -> PySide2.QtGui.QPen

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#penProperty

properties

properties() -> dict

X.properties() -> dict

Supplemental documentation: Qt 5 reference:

QMap\<int, QVariant> QTextFormat::properties() const

Returns a map with all properties of this text format.

Upstream PySide2 reference signatures (binding differences may apply):

properties(self) -> typing.Dict[int, typing.Any]

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#properties

property

property(propertyId: int) -> Any

X.property(propertyId) -> object

Supplemental documentation: Qt 5 reference:

QVariant QTextFormat::property(int propertyId) const

Returns the property specified by the given propertyId.

See also setProperty() and Property.

Upstream PySide2 reference signatures (binding differences may apply):

property(self, propertyId: int) -> typing.Any

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#property

propertyCount

propertyCount() -> int

X.propertyCount() -> int

Supplemental documentation: Qt 5 reference:

int QTextFormat::propertyCount() const

Returns the number of properties stored in the format.

This function was introduced in Qt 4.3.

Upstream PySide2 reference signatures (binding differences may apply):

propertyCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#propertyCount

setBackground

setBackground(brush: Any) -> None

X.setBackground(brush)

Supplemental documentation: Qt 5 reference:

void QTextFormat::setBackground(const QBrush \&brush)

Sets the brush use to paint the document's background to the brush specified.

See also background(), clearBackground(), and setForeground().

Upstream PySide2 reference signatures (binding differences may apply):

setBackground(self, brush: PySide2.QtGui.QBrush) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#setBackground

setForeground

setForeground(brush: Any) -> None

X.setForeground(brush)

Supplemental documentation: Qt 5 reference:

void QTextFormat::setForeground(const QBrush \&brush)

Sets the foreground brush to the specified brush. The foreground brush is mostly used to render text.

See also foreground(), clearForeground(), and setBackground().

Upstream PySide2 reference signatures (binding differences may apply):

setForeground(self, brush: PySide2.QtGui.QBrush) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#setForeground

setLayoutDirection

setLayoutDirection(direction: Any) -> None

X.setLayoutDirection(direction)

Supplemental documentation: Qt 5 reference:

void QTextFormat::setLayoutDirection(Qt::LayoutDirection direction)

Sets the document's layout direction to the specified direction.

See also layoutDirection().

Upstream PySide2 reference signatures (binding differences may apply):

setLayoutDirection(self, direction: PySide2.QtCore.Qt.LayoutDirection) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#setLayoutDirection

setObjectIndex

setObjectIndex(object: int) -> None

X.setObjectIndex(object)

Supplemental documentation: Qt 5 reference:

void QTextFormat::setObjectIndex(int index)

Sets the format object's object index.

See also objectIndex().

Upstream PySide2 reference signatures (binding differences may apply):

setObjectIndex(self, object: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#setObjectIndex

setObjectType

setObjectType(type: int) -> None

X.setObjectType(type)

Supplemental documentation: Qt 5 reference:

void QTextFormat::setObjectType(int type)

Sets the text format's object type to type.

See also ObjectTypes and objectType().

Upstream PySide2 reference signatures (binding differences may apply):

setObjectType(self, type: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#setObjectType

setProperty

setProperty(propertyId: int, value: Any) -> None

X.setProperty(propertyId, value)

Supplemental documentation: Qt 5 reference:

void QTextFormat::setProperty(int propertyId, const QVariant \&value)

Sets the property specified by the propertyId to the given value.

See also property() and Property.

void QTextFormat::setProperty(int propertyId, const QVector\<QTextLength> \&value)

Sets the value of the property given by propertyId to value.

See also lengthVectorProperty() and Property.

Upstream PySide2 reference signatures (binding differences may apply):

setProperty(self, propertyId: int, lengths: typing.List[PySide2.QtGui.QTextLength]) -> None
setProperty(self, propertyId: int, value: typing.Any) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#setProperty

stringProperty

stringProperty(propertyId: int) -> str

X.stringProperty(propertyId) -> str

Supplemental documentation: Qt 5 reference:

QString QTextFormat::stringProperty(int propertyId) const

Returns the value of the property given by propertyId; if the property isn't of QVariant::String type, an empty string is returned instead.

See also setProperty(), boolProperty(), intProperty(), doubleProperty(), colorProperty(), lengthProperty(), lengthVectorProperty(), and Property.

Upstream PySide2 reference signatures (binding differences may apply):

stringProperty(self, propertyId: int) -> str

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#stringProperty

swap

swap(other: Any) -> None

X.swap(other)

Supplemental documentation: Qt 5 reference:

void QTextFormat::swap(QTextFormat \&other)

Swaps this text format with other. This function is very fast and never fails.

This function was introduced in Qt 5.0.

Upstream PySide2 reference signatures (binding differences may apply):

swap(self, other: PySide2.QtGui.QTextFormat) -> None

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#swap

toBlockFormat

toBlockFormat() -> Any

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

Supplemental documentation: Qt 5 reference:

QTextBlockFormat QTextFormat::toBlockFormat() const

Returns this format as a block format.

Upstream PySide2 reference signatures (binding differences may apply):

toBlockFormat(self) -> PySide2.QtGui.QTextBlockFormat

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#toBlockFormat

toCharFormat

toCharFormat() -> Any

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

Supplemental documentation: Qt 5 reference:

QTextCharFormat QTextFormat::toCharFormat() const

Returns this format as a character format.

Upstream PySide2 reference signatures (binding differences may apply):

toCharFormat(self) -> PySide2.QtGui.QTextCharFormat

Source: https://doc.qt.io/archives/qt-5.15/qtextformat.html#toCharFormat