Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTextCharFormat Class Reference

\reentrant More...

#include <qtextformat.h>

+ Inheritance diagram for QTextCharFormat:
+ Collaboration diagram for QTextCharFormat:

Public Types

enum  VerticalAlignment {
  AlignNormal = 0 , AlignSuperScript , AlignSubScript , AlignMiddle ,
  AlignTop , AlignBottom , AlignBaseline
}
 This enum describes the ways that adjacent characters can be vertically aligned. More...
 
enum  UnderlineStyle {
  NoUnderline , SingleUnderline , DashUnderline , DotLine ,
  DashDotLine , DashDotDotLine , WaveUnderline , SpellCheckUnderline
}
 This enum describes the different ways drawing underlined text. More...
 
enum  FontPropertiesInheritanceBehavior { FontPropertiesSpecifiedOnly , FontPropertiesAll }
 
- Public Types inherited from QTextFormat
enum  FormatType {
  InvalidFormat = -1 , BlockFormat = 1 , CharFormat = 2 , ListFormat = 3 ,
  FrameFormat = 5 , UserFormat = 100
}
 This enum describes the text item a QTextFormat object is formatting. More...
 
enum  Property {
  ObjectIndex = 0x0 , CssFloat = 0x0800 , LayoutDirection = 0x0801 , OutlinePen = 0x810 ,
  BackgroundBrush = 0x820 , ForegroundBrush = 0x821 , BackgroundImageUrl = 0x823 , BlockAlignment = 0x1010 ,
  BlockTopMargin = 0x1030 , BlockBottomMargin = 0x1031 , BlockLeftMargin = 0x1032 , BlockRightMargin = 0x1033 ,
  TextIndent = 0x1034 , TabPositions = 0x1035 , BlockIndent = 0x1040 , LineHeight = 0x1048 ,
  LineHeightType = 0x1049 , BlockNonBreakableLines = 0x1050 , BlockTrailingHorizontalRulerWidth = 0x1060 , HeadingLevel = 0x1070 ,
  BlockQuoteLevel = 0x1080 , BlockCodeLanguage = 0x1090 , BlockCodeFence = 0x1091 , BlockMarker = 0x10A0 ,
  FirstFontProperty = 0x1FE0 , FontCapitalization = FirstFontProperty , FontLetterSpacing = 0x1FE1 , FontWordSpacing = 0x1FE2 ,
  FontStyleHint = 0x1FE3 , FontStyleStrategy = 0x1FE4 , FontKerning = 0x1FE5 , FontHintingPreference = 0x1FE6 ,
  FontFamilies = 0x1FE7 , FontStyleName = 0x1FE8 , FontLetterSpacingType = 0x1FE9 , FontStretch = 0x1FEA ,
  FontPointSize = 0x2001 , FontSizeAdjustment = 0x2002 , FontSizeIncrement = FontSizeAdjustment , FontWeight = 0x2003 ,
  FontItalic = 0x2004 , FontUnderline = 0x2005 , FontOverline = 0x2006 , FontStrikeOut = 0x2007 ,
  FontFixedPitch = 0x2008 , FontPixelSize = 0x2009 , LastFontProperty = FontPixelSize , TextUnderlineColor = 0x2020 ,
  TextVerticalAlignment = 0x2021 , TextOutline = 0x2022 , TextUnderlineStyle = 0x2023 , TextToolTip = 0x2024 ,
  TextSuperScriptBaseline = 0x2025 , TextSubScriptBaseline = 0x2026 , TextBaselineOffset = 0x2027 , IsAnchor = 0x2030 ,
  AnchorHref = 0x2031 , AnchorName = 0x2032 , OldFontLetterSpacingType = 0x2033 , OldFontStretch = 0x2034 ,
  OldTextUnderlineColor = 0x2010 , OldFontFamily = 0x2000 , ObjectType = 0x2f00 , ListStyle = 0x3000 ,
  ListIndent = 0x3001 , ListNumberPrefix = 0x3002 , ListNumberSuffix = 0x3003 , ListStart = 0x3004 ,
  FrameBorder = 0x4000 , FrameMargin = 0x4001 , FramePadding = 0x4002 , FrameWidth = 0x4003 ,
  FrameHeight = 0x4004 , FrameTopMargin = 0x4005 , FrameBottomMargin = 0x4006 , FrameLeftMargin = 0x4007 ,
  FrameRightMargin = 0x4008 , FrameBorderBrush = 0x4009 , FrameBorderStyle = 0x4010 , TableColumns = 0x4100 ,
  TableColumnWidthConstraints = 0x4101 , TableCellSpacing = 0x4102 , TableCellPadding = 0x4103 , TableHeaderRowCount = 0x4104 ,
  TableBorderCollapse = 0x4105 , TableCellRowSpan = 0x4810 , TableCellColumnSpan = 0x4811 , TableCellTopPadding = 0x4812 ,
  TableCellBottomPadding = 0x4813 , TableCellLeftPadding = 0x4814 , TableCellRightPadding = 0x4815 , TableCellTopBorder = 0x4816 ,
  TableCellBottomBorder = 0x4817 , TableCellLeftBorder = 0x4818 , TableCellRightBorder = 0x4819 , TableCellTopBorderStyle = 0x481a ,
  TableCellBottomBorderStyle = 0x481b , TableCellLeftBorderStyle = 0x481c , TableCellRightBorderStyle = 0x481d , TableCellTopBorderBrush = 0x481e ,
  TableCellBottomBorderBrush = 0x481f , TableCellLeftBorderBrush = 0x4820 , TableCellRightBorderBrush = 0x4821 , ImageName = 0x5000 ,
  ImageTitle = 0x5001 , ImageAltText = 0x5002 , ImageWidth = 0x5010 , ImageHeight = 0x5011 ,
  ImageQuality = 0x5014 , FullWidthSelection = 0x06000 , PageBreakPolicy = 0x7000 , UserProperty = 0x100000
}
 This enum describes the different properties a format can have. More...
 
enum  ObjectTypes {
  NoObject , ImageObject , TableObject , TableCellObject ,
  UserObject = 0x1000
}
 This enum describes what kind of QTextObject this format is associated with. More...
 
enum  PageBreakFlag { PageBreak_Auto = 0 , PageBreak_AlwaysBefore = 0x001 , PageBreak_AlwaysAfter = 0x010 }
 

Public Member Functions

 QTextCharFormat ()
 Constructs a new character format object.
 
bool isValid () const
 Returns true if this character format is valid; otherwise returns false.
 
void setFont (const QFont &font, FontPropertiesInheritanceBehavior behavior=FontPropertiesAll)
 
QFont font () const
 Returns the font for this character format.
 
void setFontFamilies (const QStringList &families)
 
QStringList fontFamilies () const
 
void setFontStyleName (const QString &styleName)
 
QStringList fontStyleName () const
 
void setFontPointSize (qreal size)
 Sets the text format's font size.
 
qreal fontPointSize () const
 Returns the font size used to display text in this format.
 
void setFontWeight (int weight)
 Sets the text format's font weight to weight.
 
int fontWeight () const
 Returns the text format's font weight.
 
void setFontItalic (bool italic)
 If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic.
 
bool fontItalic () const
 Returns true if the text format's font is italic; otherwise returns false.
 
void setFontCapitalization (QFont::Capitalization capitalization)
 
QFont::Capitalization fontCapitalization () const
 
void setFontLetterSpacingType (QFont::SpacingType letterSpacingType)
 
QFont::SpacingType fontLetterSpacingType () const
 
void setFontLetterSpacing (qreal spacing)
 
qreal fontLetterSpacing () const
 
void setFontWordSpacing (qreal spacing)
 
qreal fontWordSpacing () const
 
void setFontUnderline (bool underline)
 If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined.
 
bool fontUnderline () const
 Returns true if the text format's font is underlined; otherwise returns false.
 
void setFontOverline (bool overline)
 If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined.
 
bool fontOverline () const
 Returns true if the text format's font is overlined; otherwise returns false.
 
void setFontStrikeOut (bool strikeOut)
 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.
 
bool fontStrikeOut () const
 Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false.
 
void setUnderlineColor (const QColor &color)
 Sets the color used to draw underlines, overlines and strikeouts on the characters with this format to the color specified.
 
QColor underlineColor () const
 Returns the color used to draw underlines, overlines and strikeouts on the characters with this format.
 
void setFontFixedPitch (bool fixedPitch)
 If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used.
 
bool fontFixedPitch () const
 Returns true if the text format's font is fixed pitch; otherwise returns false.
 
void setFontStretch (int factor)
 
int fontStretch () const
 
void setFontStyleHint (QFont::StyleHint hint, QFont::StyleStrategy strategy=QFont::PreferDefault)
 
void setFontStyleStrategy (QFont::StyleStrategy strategy)
 
QFont::StyleHint fontStyleHint () const
 
QFont::StyleStrategy fontStyleStrategy () const
 
void setFontHintingPreference (QFont::HintingPreference hintingPreference)
 
QFont::HintingPreference fontHintingPreference () const
 
void setFontKerning (bool enable)
 
bool fontKerning () const
 
void setUnderlineStyle (UnderlineStyle style)
 
UnderlineStyle underlineStyle () const
 
void setVerticalAlignment (VerticalAlignment alignment)
 Sets the vertical alignment used for the characters with this format to the alignment specified.
 
VerticalAlignment verticalAlignment () const
 Returns the vertical alignment used for characters with this format.
 
void setTextOutline (const QPen &pen)
 Sets the pen used to draw the outlines of characters to the given pen.
 
QPen textOutline () const
 Returns the pen used to draw the outlines of characters in this format.
 
void setToolTip (const QString &tip)
 
QString toolTip () const
 
void setSuperScriptBaseline (qreal baseline)
 
qreal superScriptBaseline () const
 
void setSubScriptBaseline (qreal baseline)
 
qreal subScriptBaseline () const
 
void setBaselineOffset (qreal baseline)
 
qreal baselineOffset () const
 
void setAnchor (bool anchor)
 If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally.
 
bool isAnchor () const
 Returns true if the text is formatted as an anchor; otherwise returns false.
 
void setAnchorHref (const QString &value)
 Sets the hypertext link for the text format to the given value.
 
QString anchorHref () const
 Returns the text format's hypertext link, or an empty string if none has been set.
 
void setAnchorNames (const QStringList &names)
 
QStringList anchorNames () const
 
void setTableCellRowSpan (int tableCellRowSpan)
 
int tableCellRowSpan () const
 
void setTableCellColumnSpan (int tableCellColumnSpan)
 
int tableCellColumnSpan () const
 
- Public Member Functions inherited from QTextFormat
 QTextFormat ()
 Creates a new text format with an InvalidFormat.
 
 QTextFormat (int type)
 Creates a new text format of the given type.
 
 QTextFormat (const QTextFormat &rhs)
 Creates a new text format with the same attributes as the other text format.
 
QTextFormatoperator= (const QTextFormat &rhs)
 Assigns the other text format to this text format, and returns a reference to this text format.
 
 ~QTextFormat ()
 Destroys this text format.
 
void swap (QTextFormat &other)
 
void merge (const QTextFormat &other)
 Merges the other format with this format; where there are conflicts the other format takes precedence.
 
bool isValid () const
 Returns true if the format is valid (i.e.
 
bool isEmpty () const
 
int type () const
 Returns the type of this format.
 
int objectIndex () const
 Returns the index of the format object, or -1 if the format object is invalid.
 
void setObjectIndex (int object)
 Sets the format object's object index.
 
QVariant property (int propertyId) const
 Returns the property specified by the given propertyId.
 
void setProperty (int propertyId, const QVariant &value)
 Sets the property specified by the propertyId to the given value.
 
void clearProperty (int propertyId)
 Clears the value of the property given by propertyId.
 
bool hasProperty (int propertyId) const
 Returns true if the text format has a property with the given propertyId; otherwise returns false.
 
bool boolProperty (int propertyId) const
 Returns the value of the property specified by propertyId.
 
int intProperty (int propertyId) const
 Returns the value of the property specified by propertyId.
 
qreal doubleProperty (int propertyId) const
 Returns the value of the property specified by propertyId.
 
QString stringProperty (int propertyId) const
 Returns the value of the property given by propertyId; if the property isn't of QMetaType::QString type, an empty string is returned instead.
 
QColor colorProperty (int propertyId) const
 Returns the value of the property given by propertyId; if the property isn't of QMetaType::QColor type, an invalid color is returned instead.
 
QPen penProperty (int propertyId) const
 Returns the value of the property given by propertyId; if the property isn't of QMetaType::QPen type, Qt::NoPen is returned instead.
 
QBrush brushProperty (int propertyId) const
 Returns the value of the property given by propertyId; if the property isn't of QMetaType::QBrush type, Qt::NoBrush is returned instead.
 
QTextLength lengthProperty (int propertyId) const
 Returns the value of the property given by propertyId.
 
QList< QTextLengthlengthVectorProperty (int propertyId) const
 Returns the value of the property given by propertyId.
 
void setProperty (int propertyId, const QList< QTextLength > &lengths)
 Sets the value of the property given by propertyId to value.
 
QMap< int, QVariantproperties () const
 Returns a map with all properties of this text format.
 
int propertyCount () const
 
void setObjectType (int type)
 Sets the text format's object type to type.
 
int objectType () const
 Returns the text format's object type.
 
bool isCharFormat () const
 Returns true if this text format is a CharFormat; otherwise returns false.
 
bool isBlockFormat () const
 Returns true if this text format is a BlockFormat; otherwise returns false.
 
bool isListFormat () const
 Returns true if this text format is a ListFormat; otherwise returns false.
 
bool isFrameFormat () const
 Returns true if this text format is a FrameFormat; otherwise returns false.
 
bool isImageFormat () const
 Returns true if this text format is an image format; otherwise returns false.
 
bool isTableFormat () const
 Returns true if this text format is a TableFormat; otherwise returns false.
 
bool isTableCellFormat () const
 
QTextBlockFormat toBlockFormat () const
 Returns this format as a block format.
 
QTextCharFormat toCharFormat () const
 Returns this format as a character format.
 
QTextListFormat toListFormat () const
 Returns this format as a list format.
 
QTextTableFormat toTableFormat () const
 Returns this format as a table format.
 
QTextFrameFormat toFrameFormat () const
 Returns this format as a frame format.
 
QTextImageFormat toImageFormat () const
 Returns this format as an image format.
 
QTextTableCellFormat toTableCellFormat () const
 
bool operator== (const QTextFormat &rhs) const
 Returns true if this text format is the same as the other text format.
 
bool operator!= (const QTextFormat &rhs) const
 Returns true if this text format is different from the other text format.
 
 operator QVariant () const
 Returns the text format as a QVariant.
 
void setLayoutDirection (Qt::LayoutDirection direction)
 Sets the document's layout direction to the specified direction.
 
Qt::LayoutDirection layoutDirection () const
 Returns the document's layout direction.
 
void setBackground (const QBrush &brush)
 Sets the brush use to paint the document's background to the brush specified.
 
QBrush background () const
 Returns the brush used to paint the document's background.
 
void clearBackground ()
 Clears the brush used to paint the document's background.
 
void setForeground (const QBrush &brush)
 Sets the foreground brush to the specified brush.
 
QBrush foreground () const
 Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
 
void clearForeground ()
 Clears the brush used to paint the document's foreground.
 

Protected Member Functions

 QTextCharFormat (const QTextFormat &fmt)
 

Friends

class QTextFormat
 
Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &, const QTextCharFormat &)
 
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &, QTextCharFormat &)
 

Detailed Description

\reentrant

The QTextCharFormat class provides formatting information for characters in a QTextDocument. \inmodule QtGui

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. setFontFamilies() 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.

See also
QTextFormat, QTextBlockFormat, QTextTableFormat, QTextListFormat

Definition at line 381 of file qtextformat.h.

Member Enumeration Documentation

◆ FontPropertiesInheritanceBehavior

Since
5.3

This enum specifies how the setFont() function should behave with respect to unset font properties.

\value FontPropertiesSpecifiedOnly If a property is not explicitly set, do not change the text format's property value. \value FontPropertiesAll If a property is not explicitly set, override the text format's property with a default value.

See also
setFont()
Enumerator
FontPropertiesSpecifiedOnly 
FontPropertiesAll 

Definition at line 408 of file qtextformat.h.

◆ UnderlineStyle

This enum describes the different ways drawing underlined text.

\value NoUnderline Text is draw without any underlining decoration. \value SingleUnderline A line is drawn using Qt::SolidLine. \value DashUnderline Dashes are drawn using Qt::DashLine. \value DotLine Dots are drawn using Qt::DotLine; \value DashDotLine Dashes and dots are drawn using Qt::DashDotLine. \value DashDotDotLine Underlines draw drawn using Qt::DashDotDotLine. \value WaveUnderline The text is underlined using a wave shaped line. \value SpellCheckUnderline The underline is drawn depending on the SpellCheckUnderlineStyle theme hint of QPlatformTheme. By default this is mapped to WaveUnderline, on \macos it is mapped to DotLine.

See also
Qt::PenStyle
Enumerator
NoUnderline 
SingleUnderline 
DashUnderline 
DotLine 
DashDotLine 
DashDotDotLine 
WaveUnderline 
SpellCheckUnderline 

Definition at line 393 of file qtextformat.h.

◆ VerticalAlignment

This enum describes the ways that adjacent characters can be vertically aligned.

\value AlignNormal Adjacent characters are positioned in the standard way for text in the writing system in use. \value AlignSuperScript Characters are placed above the base line for normal text. \value AlignSubScript Characters are placed below the base line for normal text. \value AlignMiddle The center of the object is vertically aligned with the base line. Currently, this is only implemented for inline objects. \value AlignBottom The bottom edge of the object is vertically aligned with the base line. \value AlignTop The top edge of the object is vertically aligned with the base line. \value AlignBaseline The base lines of the characters are aligned.

Enumerator
AlignNormal 
AlignSuperScript 
AlignSubScript 
AlignMiddle 
AlignTop 
AlignBottom 
AlignBaseline 

Definition at line 384 of file qtextformat.h.

Constructor & Destructor Documentation

◆ QTextCharFormat() [1/2]

QTextCharFormat::QTextCharFormat ( )

Constructs a new character format object.

Definition at line 1455 of file qtextformat.cpp.

◆ QTextCharFormat() [2/2]

QTextCharFormat::QTextCharFormat ( const QTextFormat & other)
explicitprotected

Creates a new character format with the same attributes as the given text format.

Definition at line 1464 of file qtextformat.cpp.

Member Function Documentation

◆ anchorHref()

QString QTextCharFormat::anchorHref ( ) const
inline

Returns the text format's hypertext link, or an empty string if none has been set.

Definition at line 566 of file qtextformat.h.

References QTextFormat::AnchorHref, and QTextFormat::stringProperty().

Referenced by QWidgetTextControlPrivate::activateLinkUnderCursor(), QQuickTextControlPrivate::activateLinkUnderCursor(), QPlainTextEdit::anchorAt(), and QAbstractTextDocumentLayout::anchorAt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ anchorNames()

QStringList QTextCharFormat::anchorNames ( ) const
Since
4.3

Returns the anchor names associated with this text format, or an empty string list if none has been set. If the anchor names are set, text with this format can be the destination of a hypertext link.

Definition at line 1986 of file qtextformat.cpp.

References QTextFormat::AnchorName, property, QVariant::toString(), QVariant::toStringList(), and QVariant::userType().

Referenced by QTextHtmlImporter::import().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ baselineOffset()

qreal QTextCharFormat::baselineOffset ( ) const
inline
Since
6.0

Returns the the baseline offset in %.

See also
setBaselineOffset(), setSubScriptBaseline(), subScriptBaseline(), setSuperScriptBaseline(), superScriptBaseline()

Definition at line 556 of file qtextformat.h.

References QTextFormat::doubleProperty(), QTextFormat::hasProperty(), and QTextFormat::TextBaselineOffset.

+ Here is the call graph for this function:

◆ font()

QFont QTextCharFormat::font ( ) const

Returns the font for this character format.

Definition at line 2152 of file qtextformat.cpp.

References d.

Referenced by QQuickTextNodeEngine::addTextBlock(), QAbstractTextDocumentLayout::blockWithMarkerAt(), QTextDocumentLayoutPrivate::drawListItem(), QQuickTextSelection::font(), QScriptLine::setDefaultHeight(), and setFont().

+ Here is the caller graph for this function:

◆ fontCapitalization()

Capitalization QTextCharFormat::fontCapitalization ( ) const
inline
Since
4.4

Returns the current capitalization type of the font.

Definition at line 457 of file qtextformat.h.

References QTextFormat::FontCapitalization, and QTextFormat::intProperty().

Referenced by QTextEngine::itemize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontFamilies()

QStringList QTextCharFormat::fontFamilies ( ) const
inline

Definition at line 428 of file qtextformat.h.

References QTextFormat::FontFamilies, and property.

◆ fontFixedPitch()

bool QTextCharFormat::fontFixedPitch ( ) const
inline

Returns true if the text format's font is fixed pitch; otherwise returns false.

See also
font()

Definition at line 493 of file qtextformat.h.

References QTextFormat::boolProperty(), and QTextFormat::FontFixedPitch.

+ Here is the call graph for this function:

◆ fontHintingPreference()

QFont::HintingPreference QTextCharFormat::fontHintingPreference ( ) const
inline
Since
4.8

Returns the hinting preference set for this text format.

See also
font(), QFont::hintingPreference()

Definition at line 515 of file qtextformat.h.

References QTextFormat::FontHintingPreference, and QTextFormat::intProperty().

+ Here is the call graph for this function:

◆ fontItalic()

bool QTextCharFormat::fontItalic ( ) const
inline

Returns true if the text format's font is italic; otherwise returns false.

See also
font()

Definition at line 453 of file qtextformat.h.

References QTextFormat::boolProperty(), and QTextFormat::FontItalic.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontKerning()

bool QTextCharFormat::fontKerning ( ) const
inline
Since
4.5

Returns true if the font kerning is enabled.

See also
setFontKerning()
font()

Definition at line 522 of file qtextformat.h.

References QTextFormat::boolProperty(), and QTextFormat::FontKerning.

+ Here is the call graph for this function:

◆ fontLetterSpacing()

qreal QTextCharFormat::fontLetterSpacing ( ) const
inline
Since
4.4

Returns the current letter spacing.

See also
setFontLetterSpacing()
setFontLetterSpacingType()
fontLetterSpacingType()

Definition at line 465 of file qtextformat.h.

References QTextFormat::doubleProperty(), and QTextFormat::FontLetterSpacing.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontLetterSpacingType()

QFont::SpacingType QTextCharFormat::fontLetterSpacingType ( ) const
inline
Since
5.0

Returns the letter spacing type of this format..

See also
setFontLetterSpacingType()
setFontLetterSpacing()
fontLetterSpacing()

Definition at line 461 of file qtextformat.h.

References QTextFormat::FontLetterSpacingType, and QTextFormat::intProperty().

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontOverline()

bool QTextCharFormat::fontOverline ( ) const
inline

Returns true if the text format's font is overlined; otherwise returns false.

See also
font()

Definition at line 478 of file qtextformat.h.

References QTextFormat::boolProperty(), and QTextFormat::FontOverline.

Referenced by QTextItemInt::initWithScriptItem(), and QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontPointSize()

qreal QTextCharFormat::fontPointSize ( ) const
inline

Returns the font size used to display text in this format.

See also
font()

Definition at line 444 of file qtextformat.h.

References QTextFormat::doubleProperty(), and QTextFormat::FontPointSize.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontStretch()

int QTextCharFormat::fontStretch ( ) const
inline
Since
5.0

Returns the current font stretching.

See also
setFontStretch()

Definition at line 498 of file qtextformat.h.

References QTextFormat::FontStretch, and QTextFormat::intProperty().

+ Here is the call graph for this function:

◆ fontStrikeOut()

bool QTextCharFormat::fontStrikeOut ( ) const
inline

Returns true if the text format's font is struck out (has a horizontal line drawn through it); otherwise returns false.

See also
font()

Definition at line 483 of file qtextformat.h.

References QTextFormat::boolProperty(), and QTextFormat::FontStrikeOut.

Referenced by QTextItemInt::initWithScriptItem(), and QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontStyleHint()

QTextCharFormat::StyleHint QTextCharFormat::fontStyleHint ( ) const
inline
Since
4.5

Returns the font style hint.

See also
setFontStyleHint(), font()

Definition at line 505 of file qtextformat.h.

References QTextFormat::FontStyleHint, and QTextFormat::intProperty().

+ Here is the call graph for this function:

◆ fontStyleName()

QStringList QTextCharFormat::fontStyleName ( ) const
inline

Definition at line 438 of file qtextformat.h.

References QTextFormat::FontStyleName, and property.

◆ fontStyleStrategy()

QTextCharFormat::StyleStrategy QTextCharFormat::fontStyleStrategy ( ) const
inline
Since
4.5

Returns the current font style strategy.

See also
setFontStyleStrategy()
font()

Definition at line 507 of file qtextformat.h.

References QTextFormat::FontStyleStrategy, and QTextFormat::intProperty().

+ Here is the call graph for this function:

◆ fontUnderline()

bool QTextCharFormat::fontUnderline ( ) const

Returns true if the text format's font is underlined; otherwise returns false.

See also
font()

Definition at line 1636 of file qtextformat.cpp.

References QTextFormat::boolProperty(), QTextFormat::FontUnderline, QTextFormat::hasProperty(), SingleUnderline, QTextFormat::TextUnderlineStyle, and underlineStyle().

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontWeight()

int QTextCharFormat::fontWeight ( ) const
inline

Returns the text format's font weight.

See also
font(), QFont::Weight

Definition at line 449 of file qtextformat.h.

References FontWeight, QTextFormat::hasProperty(), QTextFormat::intProperty(), and QFont::Normal.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fontWordSpacing()

qreal QTextCharFormat::fontWordSpacing ( ) const
inline
Since
4.4

Returns the current word spacing value.

Definition at line 469 of file qtextformat.h.

References QTextFormat::doubleProperty(), and QTextFormat::FontWordSpacing.

Referenced by QTextHtmlExporter::toHtml().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAnchor()

bool QTextCharFormat::isAnchor ( ) const
inline

Returns true if the text is formatted as an anchor; otherwise returns false.

See also
setAnchor(), setAnchorHref(), setAnchorNames()

Definition at line 561 of file qtextformat.h.

References QTextFormat::boolProperty(), and QTextFormat::IsAnchor.

Referenced by QQuickTextNodeEngine::addTextBlock(), and QTextHtmlImporter::import().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isValid()

bool QTextCharFormat::isValid ( ) const
inline

Returns true if this character format is valid; otherwise returns false.

Definition at line 406 of file qtextformat.h.

References QTextFormat::isCharFormat().

Referenced by QWidgetTextControlPrivate::inputMethodEvent(), and QTextCursor::insertText().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAnchor()

void QTextCharFormat::setAnchor ( bool anchor)
inline

If anchor is true, text with this format represents an anchor, and is formatted in the appropriate way; otherwise the text is formatted normally.

(Anchors are hyperlinks which are often shown underlined and in a different color from plain text.)

The way the text is rendered is independent of whether or not the format has a valid anchor defined. Use setAnchorHref(), and optionally setAnchorNames() to create a hypertext link.

See also
isAnchor()

Definition at line 559 of file qtextformat.h.

References QTextFormat::IsAnchor, and setProperty.

Referenced by QTextHtmlParser::applyAttributes(), and QTextHtmlParserNode::initializeProperties().

+ Here is the caller graph for this function:

◆ setAnchorHref()

void QTextCharFormat::setAnchorHref ( const QString & value)
inline

Sets the hypertext link for the text format to the given value.

This is typically a URL like "http://example.com/index.html".

The anchor will be displayed with the value as its display text; if you want to display different text call setAnchorNames().

To format the text as a hypertext link use setAnchor().

Definition at line 564 of file qtextformat.h.

References QTextFormat::AnchorHref, and setProperty.

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the caller graph for this function:

◆ setAnchorNames()

void QTextCharFormat::setAnchorNames ( const QStringList & names)
inline
Since
4.3

Sets the text format's anchor names. For the anchor to work as a hyperlink, the destination must be set with setAnchorHref() and the anchor must be enabled with setAnchor().

Definition at line 569 of file qtextformat.h.

References QTextFormat::AnchorName, and setProperty.

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the caller graph for this function:

◆ setBaselineOffset()

void QTextCharFormat::setBaselineOffset ( qreal baseline)
inline
Since
6.0

Sets the base line (in % of height) of text to baseline. A positive value moves the text up, by the corresponding %; a negative value moves it down. The default value is 0.

See also
baselineOffset(), setSubScriptBaseline(), subScriptBaseline(), setSuperScriptBaseline(), superScriptBaseline()

Definition at line 554 of file qtextformat.h.

References setProperty, and QTextFormat::TextBaselineOffset.

◆ setFont()

void QTextCharFormat::setFont ( const QFont & font,
FontPropertiesInheritanceBehavior behavior = FontPropertiesAll )
Since
5.3

Sets the text format's font.

If behavior is QTextCharFormat::FontPropertiesAll, the font property that has not been explicitly set is treated like as it were set with default value; If behavior is QTextCharFormat::FontPropertiesSpecifiedOnly, the font property that has not been explicitly set is ignored and the respective property value remains unchanged.

See also
font()

Definition at line 2096 of file qtextformat.cpp.

References QFont::AllPropertiesResolved, QFont::capitalization(), QFont::CapitalizationResolved, QFont::families(), QFont::FamiliesResolved, QFont::fixedPitch(), QFont::FixedPitchResolved, font(), QTextFormat::FontPixelSize, FontPropertiesAll, QFont::hintingPreference(), QFont::HintingPreferenceResolved, QFont::kerning(), QFont::KerningResolved, QFont::letterSpacing(), QFont::LetterSpacingResolved, QFont::letterSpacingType(), NoUnderline, QFont::overline(), QFont::OverlineResolved, QFont::pixelSize(), QFont::pointSizeF(), QFont::resolveMask(), setFontCapitalization(), setFontFamilies(), setFontFixedPitch(), setFontHintingPreference(), setFontItalic(), setFontKerning(), setFontLetterSpacing(), setFontLetterSpacingType(), setFontOverline(), setFontPointSize(), setFontStretch(), setFontStrikeOut(), setFontStyleHint(), setFontStyleName(), setFontStyleStrategy(), setFontWeight(), setFontWordSpacing(), setProperty, setUnderlineStyle(), SingleUnderline, QFont::SizeResolved, QFont::stretch(), QFont::StretchResolved, QFont::strikeOut(), QFont::StrikeOutResolved, QFont::style(), QFont::styleHint(), QFont::StyleHintResolved, QFont::styleName(), QFont::StyleNameResolved, QFont::StyleNormal, QFont::StyleResolved, QFont::styleStrategy(), QFont::StyleStrategyResolved, QFont::underline(), QFont::UnderlineResolved, QFont::weight(), QFont::WeightResolved, QFont::wordSpacing(), and QFont::WordSpacingResolved.

Referenced by QTextHtmlExporter::QTextHtmlExporter(), QTextEdit::setCurrentFont(), QQuickTextSelection::setFont(), and QSyntaxHighlighter::setFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFontCapitalization()

void QTextCharFormat::setFontCapitalization ( QFont::Capitalization capitalization)
inline
Since
4.4

Sets the capitalization of the text that appears in this font to capitalization.

A font's capitalization makes the text appear in the selected capitalization mode.

See also
fontCapitalization()

Definition at line 455 of file qtextformat.h.

References QTextFormat::FontCapitalization, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontFamilies()

void QTextCharFormat::setFontFamilies ( const QStringList & families)
inline
Since
5.13

Sets the text format's font families.

See also
setFont()

Definition at line 422 of file qtextformat.h.

References QTextFormat::FontFamilies, and setProperty.

Referenced by QTextHtmlParser::applyAttributes(), setFont(), and QTextEdit::setFontFamily().

+ Here is the caller graph for this function:

◆ setFontFixedPitch()

void QTextCharFormat::setFontFixedPitch ( bool fixedPitch)
inline

If fixedPitch is true, sets the text format's font to be fixed pitch; otherwise a non-fixed pitch font is used.

See also
setFont()

Definition at line 491 of file qtextformat.h.

References QTextFormat::FontFixedPitch, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontHintingPreference()

void QTextCharFormat::setFontHintingPreference ( QFont::HintingPreference hintingPreference)
inline
Since
4.8

Sets the hinting preference of the text format's font to be hintingPreference.

See also
setFont(), QFont::setHintingPreference()

Definition at line 510 of file qtextformat.h.

References QTextFormat::FontHintingPreference, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontItalic()

void QTextCharFormat::setFontItalic ( bool italic)
inline

If italic is true, sets the text format's font to be italic; otherwise the font will be non-italic.

See also
setFont()

Definition at line 451 of file qtextformat.h.

References QTextFormat::FontItalic, and setProperty.

Referenced by QTextMarkdownImporter::cbEnterSpan(), main(), setFont(), and QTextEdit::setFontItalic().

+ Here is the caller graph for this function:

◆ setFontKerning()

void QTextCharFormat::setFontKerning ( bool enable)
inline
Since
4.5

Enables kerning for this font if enable is true; otherwise disables it.

When kerning is enabled, glyph metrics do not add up anymore, even for Latin text. In other words, the assumption that width('a') + width('b') is equal to width("ab") is not neccesairly true.

See also
setFont()

Definition at line 520 of file qtextformat.h.

References QTextFormat::FontKerning, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontLetterSpacing()

void QTextCharFormat::setFontLetterSpacing ( qreal spacing)
inline
Since
4.4

Sets the letter spacing of this format to the given spacing. The meaning of the value depends on the font letter spacing type.

For percentage spacing a value of 100 indicates default spacing; a value of 200 doubles the amount of space a letter takes.

See also
fontLetterSpacing()
setFontLetterSpacingType()
fontLetterSpacingType()

Definition at line 463 of file qtextformat.h.

References QTextFormat::FontLetterSpacing, setProperty, and spacing.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontLetterSpacingType()

void QTextCharFormat::setFontLetterSpacingType ( QFont::SpacingType letterSpacingType)
inline
Since
5.0

Sets the letter spacing type of this format to letterSpacingType.

See also
fontLetterSpacingType()
setFontLetterSpacing()
fontLetterSpacing()

Definition at line 459 of file qtextformat.h.

References QTextFormat::FontLetterSpacingType, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontOverline()

void QTextCharFormat::setFontOverline ( bool overline)
inline

If overline is true, sets the text format's font to be overlined; otherwise the font is displayed non-overlined.

See also
setFont()

Definition at line 476 of file qtextformat.h.

References QTextFormat::FontOverline, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontPointSize()

void QTextCharFormat::setFontPointSize ( qreal size)
inline

Sets the text format's font size.

See also
setFont()

Definition at line 442 of file qtextformat.h.

References QTextFormat::FontPointSize, and setProperty.

Referenced by setFont(), and QTextEdit::setFontPointSize().

+ Here is the caller graph for this function:

◆ setFontStretch()

void QTextCharFormat::setFontStretch ( int factor)
inline
Since
5.0

Sets the stretch factor for the font to factor.

The stretch factor changes the width of all characters in the font by factor percent. For example, setting factor to 150 results in all characters in the font being 1.5 times (ie. 150%) wider. The default stretch factor is 100. The minimum stretch factor is 1, and the maximum stretch factor is 4000.

The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts.

See also
fontStretch()

Definition at line 496 of file qtextformat.h.

References QTextFormat::FontStretch, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontStrikeOut()

void QTextCharFormat::setFontStrikeOut ( bool strikeOut)
inline

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.

See also
setFont()

Definition at line 481 of file qtextformat.h.

References QTextFormat::FontStrikeOut, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontStyleHint()

void QTextCharFormat::setFontStyleHint ( QFont::StyleHint hint,
QFont::StyleStrategy strategy = QFont::PreferDefault )
inline
Since
4.5

Sets the font style hint and strategy.

Qt does not support style hints on X11 since this information is not provided by the window system.

See also
setFont()
QFont::setStyleHint()

Definition at line 501 of file qtextformat.h.

References QTextFormat::FontStyleHint, QTextFormat::FontStyleStrategy, hint(), and setProperty.

Referenced by setFont().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFontStyleName()

void QTextCharFormat::setFontStyleName ( const QString & styleName)
inline
Since
5.13

Sets the text format's font styleName.

See also
setFont(), QFont::setStyleName()

Definition at line 432 of file qtextformat.h.

References QTextFormat::FontStyleName, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontStyleStrategy()

void QTextCharFormat::setFontStyleStrategy ( QFont::StyleStrategy strategy)
inline
Since
4.5

Sets the font style strategy.

See also
setFont()
QFont::setStyleStrategy()

Definition at line 503 of file qtextformat.h.

References QTextFormat::FontStyleStrategy, and setProperty.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setFontUnderline()

void QTextCharFormat::setFontUnderline ( bool underline)
inline

If underline is true, sets the text format's font to be underlined; otherwise it is displayed non-underlined.

See also
setFont()

Definition at line 472 of file qtextformat.h.

References NoUnderline, setProperty, SingleUnderline, and QTextFormat::TextUnderlineStyle.

Referenced by QWaylandInputMethodEventBuilder::addPreeditStyling(), main(), QLabel::paintEvent(), QAndroidInputContext::setComposingText(), QTextEdit::setFontUnderline(), QAndroidInputContext::setSelection(), and QtWaylandClient::QWaylandTextInputv3::zwp_text_input_v3_done().

+ Here is the caller graph for this function:

◆ setFontWeight()

void QTextCharFormat::setFontWeight ( int weight)
inline

Sets the text format's font weight to weight.

See also
setFont(), QFont::Weight

Definition at line 447 of file qtextformat.h.

References FontWeight, and setProperty.

Referenced by src_gui_text_qsyntaxhighlighter::MyHighlighter::highlightBlock(), MainWindow::insertCalendar(), main(), mergeFormat(), setFont(), and QTextEdit::setFontWeight().

+ Here is the caller graph for this function:

◆ setFontWordSpacing()

void QTextCharFormat::setFontWordSpacing ( qreal spacing)
inline
Since
4.4

Sets the word spacing of this format to the given spacing, in pixels.

See also
fontWordSpacing()

Definition at line 467 of file qtextformat.h.

References QTextFormat::FontWordSpacing, setProperty, and spacing.

Referenced by setFont().

+ Here is the caller graph for this function:

◆ setSubScriptBaseline()

void QTextCharFormat::setSubScriptBaseline ( qreal baseline)
inline
Since
6.0

Sets the subscript's base line as a % of font height to baseline. The default value is 16.67% (1/6 of height)

See also
subScriptBaseline(), setSuperScriptBaseline(), superScriptBaseline(), setBaselineOffset(), baselineOffset()

Definition at line 549 of file qtextformat.h.

References setProperty, and QTextFormat::TextSubScriptBaseline.

◆ setSuperScriptBaseline()

void QTextCharFormat::setSuperScriptBaseline ( qreal baseline)
inline
Since
6.0

Sets the superscript's base line as a % of font height to baseline. The default value is 50% (1/2 of height).

See also
superScriptBaseline(), setSubScriptBaseline(), subScriptBaseline(), setBaselineOffset(), baselineOffset()

Definition at line 544 of file qtextformat.h.

References setProperty, and QTextFormat::TextSuperScriptBaseline.

◆ setTableCellColumnSpan()

void QTextCharFormat::setTableCellColumnSpan ( int tableCellColumnSpan)
inline

If this character format is applied to characters in a table cell, the cell will span tableCellColumnSpan columns.

Definition at line 597 of file qtextformat.h.

References QTextFormat::clearProperty(), setProperty, and QTextFormat::TableCellColumnSpan.

Referenced by QTextTable::insertColumns().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTableCellRowSpan()

void QTextCharFormat::setTableCellRowSpan ( int tableCellRowSpan)
inline

If this character format is applied to characters in a table cell, the cell will span tableCellRowSpan rows.

Definition at line 589 of file qtextformat.h.

References QTextFormat::clearProperty(), setProperty, and QTextFormat::TableCellRowSpan.

Referenced by QTextCopyHelper::copy(), QTextTable::insertColumns(), QTextTable::insertRows(), and QTextTableCell::setFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTextOutline()

void QTextCharFormat::setTextOutline ( const QPen & pen)
inline

Sets the pen used to draw the outlines of characters to the given pen.

Definition at line 534 of file qtextformat.h.

References setProperty, and QTextFormat::TextOutline.

◆ setToolTip()

void QTextCharFormat::setToolTip ( const QString & text)
inline
Since
4.3

Sets the tool tip for a fragment of text to the given text.

Definition at line 539 of file qtextformat.h.

References setProperty, and QTextFormat::TextToolTip.

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the caller graph for this function:

◆ setUnderlineColor()

void QTextCharFormat::setUnderlineColor ( const QColor & color)
inline

Sets the color used to draw underlines, overlines and strikeouts on the characters with this format to the color specified.

See also
underlineColor()

Definition at line 486 of file qtextformat.h.

References setProperty, and QTextFormat::TextUnderlineColor.

Referenced by QIBusAttribute::format().

+ Here is the caller graph for this function:

◆ setUnderlineStyle()

void QTextCharFormat::setUnderlineStyle ( UnderlineStyle style)
Since
4.2

Sets the style of underlining the text to style.

Definition at line 1656 of file qtextformat.cpp.

References QTextFormat::FontUnderline, setProperty, SingleUnderline, and QTextFormat::TextUnderlineStyle.

Referenced by setFont(), and standardFormat().

+ Here is the caller graph for this function:

◆ setVerticalAlignment()

void QTextCharFormat::setVerticalAlignment ( VerticalAlignment alignment)
inline

Sets the vertical alignment used for the characters with this format to the alignment specified.

See also
verticalAlignment()

Definition at line 529 of file qtextformat.h.

References alignment, setProperty, and QTextFormat::TextVerticalAlignment.

Referenced by QTextHtmlParser::applyAttributes().

+ Here is the caller graph for this function:

◆ subScriptBaseline()

qreal QTextCharFormat::subScriptBaseline ( ) const
inline
Since
6.0

Returns the subscript's base line as a % of font height.

See also
setSubScriptBaseline(), setSuperScriptBaseline(), superScriptBaseline(), setBaselineOffset(), baselineOffset()

Definition at line 551 of file qtextformat.h.

References QTextFormat::doubleProperty(), QTextFormat::hasProperty(), and QTextFormat::TextSubScriptBaseline.

+ Here is the call graph for this function:

◆ superScriptBaseline()

qreal QTextCharFormat::superScriptBaseline ( ) const
inline
Since
6.0

Returns the superscript's base line as a % of font height.

See also
setSuperScriptBaseline(), setSubScriptBaseline(), subScriptBaseline(), setBaselineOffset(), baselineOffset()

Definition at line 546 of file qtextformat.h.

References QTextFormat::doubleProperty(), QTextFormat::hasProperty(), and QTextFormat::TextSuperScriptBaseline.

+ Here is the call graph for this function:

◆ tableCellColumnSpan()

int QTextCharFormat::tableCellColumnSpan ( ) const
inline

If this character format is applied to characters in a table cell, this function returns the number of columns spanned by the text (this may be 1); otherwise it returns 1.

Definition at line 577 of file qtextformat.h.

References QTextFormat::intProperty(), and QTextFormat::TableCellColumnSpan.

Referenced by QTextTableCell::columnSpan(), and QTextTable::removeColumns().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tableCellRowSpan()

int QTextCharFormat::tableCellRowSpan ( ) const
inline

If this character format is applied to characters in a table cell, this function returns the number of rows spanned by the text (this may be 1); otherwise it returns 1.

Definition at line 574 of file qtextformat.h.

References QTextFormat::intProperty(), and QTextFormat::TableCellRowSpan.

Referenced by QTextTable::mergeCells(), QTextTable::removeRows(), QTextTableCell::rowSpan(), QTextTable::splitCell(), and QTextTablePrivate::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ textOutline()

QPen QTextCharFormat::textOutline ( ) const
inline

Returns the pen used to draw the outlines of characters in this format.

Definition at line 536 of file qtextformat.h.

References QTextFormat::penProperty(), and QTextFormat::TextOutline.

+ Here is the call graph for this function:

◆ toolTip()

QString QTextCharFormat::toolTip ( ) const
inline
Since
4.3

Returns the tool tip that is displayed for a fragment of text.

Definition at line 541 of file qtextformat.h.

References QTextFormat::stringProperty(), and QTextFormat::TextToolTip.

+ Here is the call graph for this function:

◆ underlineColor()

QColor QTextCharFormat::underlineColor ( ) const
inline

Returns the color used to draw underlines, overlines and strikeouts on the characters with this format.

See also
setUnderlineColor()

Definition at line 488 of file qtextformat.h.

References QTextFormat::colorProperty(), and QTextFormat::TextUnderlineColor.

Referenced by drawTextItemDecoration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ underlineStyle()

UnderlineStyle QTextCharFormat::underlineStyle ( ) const
inline
Since
4.2

Returns the style of underlining the text.

Definition at line 526 of file qtextformat.h.

References QTextFormat::intProperty(), and QTextFormat::TextUnderlineStyle.

Referenced by fontUnderline(), and QTextItemInt::initWithScriptItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ verticalAlignment()

VerticalAlignment QTextCharFormat::verticalAlignment ( ) const
inline

Returns the vertical alignment used for characters with this format.

See also
setVerticalAlignment()

Definition at line 531 of file qtextformat.h.

References QTextFormat::intProperty(), and QTextFormat::TextVerticalAlignment.

Referenced by QQuickTextNodeEngine::addTextBlock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<

Q_GUI_EXPORT QDataStream & operator<< ( QDataStream & stream,
const QTextCharFormat & fmt )
friend

Definition at line 464 of file qtextformat.cpp.

◆ operator>>

Q_GUI_EXPORT QDataStream & operator>> ( QDataStream & stream,
QTextCharFormat & fmt )
friend

Definition at line 469 of file qtextformat.cpp.

◆ QTextFormat

friend class QTextFormat
friend

Definition at line 582 of file qtextformat.h.


The documentation for this class was generated from the following files: