PythonQt.QtGui.QTextCharFormat
QTextCharFormat
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
The character format of text in a document specifies the visual properties of the text, as well as information about its role in a hypertext document.
The font used can be set by supplying a font to the setFont() function, and each aspect of its appearance can be adjusted to give the desired effect. setFontFamily() and setFontPointSize() define the font's family (e.g. Times) and printed size; setFontWeight() and setFontItalic() provide control over the style of the font. setFontUnderline(), setFontOverline(), setFontStrikeOut(), and setFontFixedPitch() provide additional effects for text.
The color is set with setForeground(). If the text is intended to be used as an anchor (for hyperlinks), this can be enabled with setAnchor(). The setAnchorHref() and setAnchorNames() functions are used to specify the information about the hyperlink's destination and the anchor's name.
Source: https://doc.qt.io/archives/qt-5.15/qtextcharformat.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 |
|---|---|---|---|
AlignBaseline |
attribute | Any |
(shared captured text) |
AlignBottom |
attribute | Any |
(shared captured text) |
AlignMiddle |
attribute | Any |
|
AlignNormal |
attribute | Any |
|
AlignSubScript |
attribute | Any |
|
AlignSuperScript |
attribute | Any |
|
AlignTop |
attribute | Any |
(shared captured text) |
AnchorHref |
attribute | Any |
(shared captured text) |
AnchorName |
attribute | Any |
(shared captured text) |
BackgroundBrush |
attribute | Any |
(shared captured text) |
BackgroundImageUrl |
attribute | Any |
(shared captured text) |
BlockAlignment |
attribute | Any |
(shared captured text) |
BlockBottomMargin |
attribute | Any |
(shared captured text) |
BlockFormat |
attribute | Any |
(shared captured text) |
BlockIndent |
attribute | Any |
(shared captured text) |
BlockLeftMargin |
attribute | Any |
(shared captured text) |
BlockNonBreakableLines |
attribute | Any |
(shared captured text) |
BlockRightMargin |
attribute | Any |
(shared captured text) |
BlockTopMargin |
attribute | Any |
(shared captured text) |
BlockTrailingHorizontalRulerWidth |
attribute | Any |
(shared captured text) |
CharFormat |
attribute | Any |
(shared captured text) |
CssFloat |
attribute | Any |
(shared captured text) |
DashDotDotLine |
attribute | Any |
(shared captured text) |
DashDotLine |
attribute | Any |
(shared captured text) |
DashUnderline |
attribute | Any |
|
DotLine |
attribute | Any |
(shared captured text) |
FirstFontProperty |
attribute | Any |
(shared captured text) |
FontCapitalization |
attribute | Any |
(shared captured text) |
FontFamily |
attribute | Any |
(shared captured text) |
FontFixedPitch |
attribute | Any |
(shared captured text) |
FontHintingPreference |
attribute | Any |
(shared captured text) |
FontItalic |
attribute | Any |
(shared captured text) |
FontKerning |
attribute | Any |
(shared captured text) |
FontLetterSpacing |
attribute | Any |
(shared captured text) |
FontLetterSpacingType |
attribute | Any |
(shared captured text) |
FontOverline |
attribute | Any |
(shared captured text) |
FontPixelSize |
attribute | Any |
(shared captured text) |
FontPointSize |
attribute | Any |
(shared captured text) |
FontPropertiesAll |
attribute | Any |
|
FontPropertiesInheritanceBehavior |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
FontPropertiesSpecifiedOnly |
attribute | Any |
|
FontSizeAdjustment |
attribute | Any |
(shared captured text) |
FontSizeIncrement |
attribute | Any |
(shared captured text) |
FontStretch |
attribute | Any |
(shared captured text) |
FontStrikeOut |
attribute | Any |
(shared captured text) |
FontStyleHint |
attribute | Any |
(shared captured text) |
FontStyleStrategy |
attribute | Any |
(shared captured text) |
FontUnderline |
attribute | Any |
(shared captured text) |
FontWeight |
attribute | Any |
(shared captured text) |
FontWordSpacing |
attribute | Any |
(shared captured text) |
ForegroundBrush |
attribute | Any |
(shared captured text) |
FormatType |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
FrameBorder |
attribute | Any |
(shared captured text) |
FrameBorderBrush |
attribute | Any |
(shared captured text) |
FrameBorderStyle |
attribute | Any |
(shared captured text) |
FrameBottomMargin |
attribute | Any |
(shared captured text) |
FrameFormat |
attribute | Any |
(shared captured text) |
FrameHeight |
attribute | Any |
(shared captured text) |
FrameLeftMargin |
attribute | Any |
(shared captured text) |
FrameMargin |
attribute | Any |
(shared captured text) |
FramePadding |
attribute | Any |
(shared captured text) |
FrameRightMargin |
attribute | Any |
(shared captured text) |
FrameTopMargin |
attribute | Any |
(shared captured text) |
FrameWidth |
attribute | Any |
(shared captured text) |
FullWidthSelection |
attribute | Any |
(shared captured text) |
ImageHeight |
attribute | Any |
(shared captured text) |
ImageName |
attribute | Any |
(shared captured text) |
ImageObject |
attribute | Any |
(shared captured text) |
ImageWidth |
attribute | Any |
(shared captured text) |
InvalidFormat |
attribute | Any |
(shared captured text) |
IsAnchor |
attribute | Any |
(shared captured text) |
LastFontProperty |
attribute | Any |
(shared captured text) |
LayoutDirection |
attribute | Any |
(shared captured text) |
LineHeight |
attribute | Any |
(shared captured text) |
LineHeightType |
attribute | Any |
(shared captured text) |
ListFormat |
attribute | Any |
(shared captured text) |
ListIndent |
attribute | Any |
(shared captured text) |
ListNumberPrefix |
attribute | Any |
(shared captured text) |
ListNumberSuffix |
attribute | Any |
(shared captured text) |
ListStyle |
attribute | Any |
(shared captured text) |
NoObject |
attribute | Any |
(shared captured text) |
NoUnderline |
attribute | Any |
|
ObjectIndex |
attribute | Any |
(shared captured text) |
ObjectType |
attribute | Any |
(shared captured text) |
ObjectTypes |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
OutlinePen |
attribute | Any |
(shared captured text) |
PageBreakFlag |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
PageBreakFlags |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
PageBreakPolicy |
attribute | Any |
(shared captured text) |
PageBreak_AlwaysAfter |
attribute | Any |
(shared captured text) |
PageBreak_AlwaysBefore |
attribute | Any |
(shared captured text) |
PageBreak_Auto |
attribute | Any |
(shared captured text) |
Property |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
SingleUnderline |
attribute | Any |
|
SpellCheckUnderline |
attribute | Any |
|
TabPositions |
attribute | Any |
(shared captured text) |
TableCellBottomPadding |
attribute | Any |
(shared captured text) |
TableCellColumnSpan |
attribute | Any |
(shared captured text) |
TableCellLeftPadding |
attribute | Any |
(shared captured text) |
TableCellObject |
attribute | Any |
(shared captured text) |
TableCellPadding |
attribute | Any |
(shared captured text) |
TableCellRightPadding |
attribute | Any |
(shared captured text) |
TableCellRowSpan |
attribute | Any |
(shared captured text) |
TableCellSpacing |
attribute | Any |
(shared captured text) |
TableCellTopPadding |
attribute | Any |
(shared captured text) |
TableColumnWidthConstraints |
attribute | Any |
(shared captured text) |
TableColumns |
attribute | Any |
(shared captured text) |
TableFormat |
attribute | Any |
(shared captured text) |
TableHeaderRowCount |
attribute | Any |
(shared captured text) |
TableObject |
attribute | Any |
(shared captured text) |
TextIndent |
attribute | Any |
(shared captured text) |
TextOutline |
attribute | Any |
(shared captured text) |
TextToolTip |
attribute | Any |
(shared captured text) |
TextUnderlineColor |
attribute | Any |
(shared captured text) |
TextUnderlineStyle |
attribute | Any |
(shared captured text) |
TextVerticalAlignment |
attribute | Any |
(shared captured text) |
UnderlineStyle |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
UserFormat |
attribute | Any |
(shared captured text) |
UserObject |
attribute | Any |
(shared captured text) |
UserProperty |
attribute | Any |
(shared captured text) |
VerticalAlignment |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. |
WaveUnderline |
attribute | Any |
|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
anchorHref |
function | (self) -> str |
X.anchorHref() -> str |
anchorNames |
function | (self) -> tuple |
X.anchorNames() -> tuple |
background |
function | (self) -> Any |
X.background() -> PythonQt.QtGui.QBrush (shared captured text) |
boolProperty |
function | (self, propertyId: Any) -> bool |
X.boolProperty(propertyId) -> bool (shared captured text) |
brushProperty |
function | (self, propertyId: Any) -> Any |
X.brushProperty(propertyId) -> PythonQt.QtGui.QBrush (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
clearBackground |
function | (self) -> Any |
(shared captured text) |
clearForeground |
function | (self) -> Any |
(shared captured text) |
clearProperty |
function | (self, propertyId: Any) -> Any |
(shared captured text) |
colorProperty |
function | (self, propertyId: Any) -> Any |
X.colorProperty(propertyId) -> PythonQt.QtGui.QColor (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
doubleProperty |
function | (self, propertyId: Any) -> float |
X.doubleProperty(propertyId) -> float (shared captured text) |
font |
function | (self) -> Any |
X.font() -> PythonQt.QtGui.QFont |
fontCapitalization |
function | (self) -> Any |
Returns the current capitalization type of the font. |
fontFamily |
function | (self) -> str |
X.fontFamily() -> str |
fontFixedPitch |
function | (self) -> bool |
X.fontFixedPitch() -> bool |
fontHintingPreference |
function | (self) -> Any |
Returns the hinting preference set for this text format. |
fontItalic |
function | (self) -> bool |
X.fontItalic() -> bool |
fontKerning |
function | (self) -> bool |
X.fontKerning() -> bool |
fontLetterSpacing |
function | (self) -> float |
X.fontLetterSpacing() -> float |
fontLetterSpacingType |
function | (self) -> Any |
Returns the letter spacing type of this format.. |
fontOverline |
function | (self) -> bool |
X.fontOverline() -> bool |
fontPointSize |
function | (self) -> float |
X.fontPointSize() -> float |
fontStretch |
function | (self) -> int |
X.fontStretch() -> int |
fontStrikeOut |
function | (self) -> bool |
X.fontStrikeOut() -> bool |
fontStyleHint |
function | (self) -> Any |
Returns the font style hint. |
fontStyleStrategy |
function | (self) -> Any |
Returns the current font style strategy. |
fontUnderline |
function | (self) -> bool |
X.fontUnderline() -> bool |
fontWeight |
function | (self) -> int |
X.fontWeight() -> int |
fontWordSpacing |
function | (self) -> float |
X.fontWordSpacing() -> float |
foreground |
function | (self) -> Any |
X.foreground() -> PythonQt.QtGui.QBrush (shared captured text) |
hasProperty |
function | (self, propertyId: Any) -> bool |
X.hasProperty(propertyId) -> bool (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) |
intProperty |
function | (self, propertyId: Any) -> int |
X.intProperty(propertyId) -> int (shared captured text) |
isAnchor |
function | (self) -> bool |
X.isAnchor() -> bool |
isBlockFormat |
function | (self) -> bool |
X.isBlockFormat() -> bool (shared captured text) |
isCharFormat |
function | (self) -> bool |
X.isCharFormat() -> bool (shared captured text) |
isEmpty |
function | (self) -> bool |
X.isEmpty() -> bool (shared captured text) |
isFrameFormat |
function | (self) -> bool |
X.isFrameFormat() -> bool (shared captured text) |
isImageFormat |
function | (self) -> bool |
X.isImageFormat() -> bool (shared captured text) |
isListFormat |
function | (self) -> bool |
X.isListFormat() -> bool (shared captured text) |
isTableCellFormat |
function | (self) -> bool |
X.isTableCellFormat() -> bool (shared captured text) |
isTableFormat |
function | (self) -> bool |
X.isTableFormat() -> bool (shared captured text) |
isValid |
function | (self) -> bool |
X.isValid() -> bool |
layoutDirection |
function | (self) -> Any |
(shared captured text) |
lengthProperty |
function | (self, propertyId: Any) -> Any |
X.lengthProperty(propertyId) -> PythonQt.QtGui.QTextLength (shared captured text) |
lengthVectorProperty |
function | (self, propertyId: Any) -> tuple |
X.lengthVectorProperty(propertyId) -> tuple (shared captured text) |
merge |
function | (self, other: Any) -> Any |
(shared captured text) |
objectIndex |
function | (self) -> int |
X.objectIndex() -> int (shared captured text) |
objectType |
function | (self) -> int |
X.objectType() -> int (shared captured text) |
penProperty |
function | (self, propertyId: Any) -> Any |
X.penProperty(propertyId) -> PythonQt.QtGui.QPen (shared captured text) |
properties |
function | (self) -> dict |
X.properties() -> dict (shared captured text) |
property |
function | (self, propertyId: Any) -> Any |
X.property(propertyId) -> object (shared captured text) |
propertyCount |
function | (self) -> int |
X.propertyCount() -> int (shared captured text) |
readFrom |
function | (self, arg__1: Any) -> Any |
(shared captured text) |
setAnchor |
function | (self, anchor: bool) -> None |
If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally. |
setAnchorHref |
function | (self, value: str) -> None |
Sets the hypertext link for the text format to the given value. |
setAnchorNames |
function | (self, names: Any) -> None |
Sets the text format's anchor names. |
setBackground |
function | (self, brush: Any) -> Any |
(shared captured text) |
setFont |
function | (self, font: Any, behavior: Any) -> None |
X.setFont(font, behavior) |
setFontCapitalization |
function | (self, capitalization: Any) -> None |
Sets the capitalization of the text that apppears in this font to capitalization. |
setFontFamily |
function | (self, family: str) -> None |
Sets the text format's font family. |
setFontFixedPitch |
function | (self, fixedPitch: bool) -> None |
If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used. |
setFontHintingPreference |
function | (self, hintingPreference: Any) -> None |
Sets the hinting preference of the text format's font to be hintingPreference. |
setFontItalic |
function | (self, italic: bool) -> None |
If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic. |
setFontKerning |
function | (self, enable: bool) -> None |
Enables kerning for this font if enable is true; otherwise disables it. |
setFontLetterSpacing |
function | (self, spacing: float) -> None |
Sets the letter spacing of this format to the given spacing. |
setFontLetterSpacingType |
function | (self, letterSpacingType: Any) -> None |
Sets the letter spacing type of this format to letterSpacingType. |
setFontOverline |
function | (self, overline: bool) -> None |
If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined. |
setFontPointSize |
function | (self, size: float) -> None |
Sets the text format's font size. |
setFontStretch |
function | (self, factor: int) -> None |
Sets the stretch factor for the font to factor. |
setFontStrikeOut |
function | (self, strikeOut: bool) -> None |
If strikeOut is true, sets the text format's font with strike-out enabled (with a horizontal line through it); otherwise it is displayed without strikeout. |
setFontStyleHint |
function | (self, hint: Any, strategy: Any) -> None |
X.setFontStyleHint(hint, strategy) |
setFontStyleStrategy |
function | (self, strategy: Any) -> None |
Sets the font style strategy. |
setFontUnderline |
function | (self, underline: bool) -> None |
If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined. |
setFontWeight |
function | (self, weight: int) -> None |
Sets the text format's font weight to weight. |
setFontWordSpacing |
function | (self, spacing: float) -> None |
Sets the word spacing of this format to the given spacing, in pixels. |
setForeground |
function | (self, brush: Any) -> Any |
(shared captured text) |
setLayoutDirection |
function | (self, direction: Any) -> Any |
(shared captured text) |
setObjectIndex |
function | (self, object: Any) -> Any |
(shared captured text) |
setObjectType |
function | (self, type: Any) -> Any |
(shared captured text) |
setProperty |
function | (self, propertyId: Any, value: Any) -> Any |
X.setProperty(propertyId, value) (shared captured text) |
setTableCellColumnSpan |
function | (self, tableCellColumnSpan: int) -> None |
|
setTableCellRowSpan |
function | (self, tableCellRowSpan: int) -> None |
|
setTextOutline |
function | (self, pen: Any) -> None |
Sets the pen used to draw the outlines of characters to the given pen. |
setToolTip |
function | (self, tip: str) -> None |
Sets the tool tip for a fragment of text to the given text. |
setUnderlineColor |
function | (self, color: Any) -> None |
Sets the underline color used for the characters with this format to the color specified. |
setUnderlineStyle |
function | (self, style: Any) -> None |
Sets the style of underlining the text to style. |
setVerticalAlignment |
function | (self, alignment: Any) -> None |
Sets the vertical alignment used for the characters with this format to the alignment specified. |
stringProperty |
function | (self, propertyId: Any) -> str |
X.stringProperty(propertyId) -> str (shared captured text) |
swap |
function | (self, other: Any) -> Any |
(shared captured text) |
tableCellColumnSpan |
function | (self) -> int |
X.tableCellColumnSpan() -> int |
tableCellRowSpan |
function | (self) -> int |
X.tableCellRowSpan() -> int |
textOutline |
function | (self) -> Any |
X.textOutline() -> PythonQt.QtGui.QPen |
toBlockFormat |
function | (self) -> Any |
X.toBlockFormat() -> PythonQt.QtGui.QTextBlockFormat (shared captured text) |
toCharFormat |
function | (self) -> Any |
X.toCharFormat() -> PythonQt.QtGui.QTextCharFormat (shared captured text) |
toFrameFormat |
function | (self) -> Any |
X.toFrameFormat() -> PythonQt.QtGui.QTextFrameFormat (shared captured text) |
toImageFormat |
function | (self) -> Any |
X.toImageFormat() -> PythonQt.QtGui.QTextImageFormat (shared captured text) |
toListFormat |
function | (self) -> Any |
X.toListFormat() -> PythonQt.QtGui.QTextListFormat (shared captured text) |
toTableCellFormat |
function | (self) -> Any |
X.toTableCellFormat() -> PythonQt.QtGui.QTextTableCellFormat (shared captured text) |
toTableFormat |
function | (self) -> Any |
X.toTableFormat() -> PythonQt.QtGui.QTextTableFormat (shared captured text) |
toolTip |
function | (self) -> str |
X.toolTip() -> str |
type |
function | (self) -> int |
X.type() -> int (shared captured text) |
underlineColor |
function | (self) -> Any |
X.underlineColor() -> PythonQt.QtGui.QColor |
underlineStyle |
function | (self) -> Any |
Returns the style of underlining the text. |
verticalAlignment |
function | (self) -> Any |
Returns the vertical alignment used for characters with this format. |
writeTo |
function | (self, arg__1: Any) -> Any |
(shared captured text) |