Obsolete Members for QTextCharFormat

以下成员源于类 QTextCharFormat 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(obsolete) QString anchorName () const
(obsolete) void setAnchorName (const QString & name )

成员函数文档编制

QString QTextCharFormat:: anchorName () const

This function is deprecated. Use anchorNames () 代替。

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

另请参阅 setAnchorName ().

void QTextCharFormat:: setAnchorName (const QString & name )

This function is deprecated. Use setAnchorNames () 代替。

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

另请参阅 anchorName ().