Add pointers to the rich text documentation from mentions of rich text.

The QLabel documentation for instance is quite confusing since it talks
about rich text without saying what it actually is. The QTextEdit
documentation can also be improved by being more explicit.

Change-Id: Ie718d170e18a0b713fe567fb707330d0085fb9e4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Samuel Rødal 2012-11-22 12:04:40 +01:00 committed by The Qt Project
parent d6cfd2c522
commit 6a9b713071
3 changed files with 8 additions and 4 deletions

View File

@ -2156,7 +2156,8 @@
string.
\value RichText The text string is interpreted as a rich text
string.
string. See \l {Supported HTML Subset} for the definition
of rich text.
\value AutoText The text string is interpreted as for
Qt::RichText if Qt::mightBeRichText() returns true, otherwise

View File

@ -95,7 +95,8 @@ QT_BEGIN_NAMESPACE
\warning When passing a QString to the constructor or calling setText(),
make sure to sanitize your input, as QLabel tries to guess whether it
displays the text as plain text or as rich text. You may want to call
displays the text as plain text or as rich text, a subset of HTML 4
markup. You may want to call
setTextFormat() explicitly, e.g. in case you expect the text to be in
plain format but cannot control the text source (for instance when
displaying data loaded from the Web).
@ -259,6 +260,7 @@ void QLabelPrivate::init()
text, depending on the text format setting; see setTextFormat().
The default setting is Qt::AutoText; i.e. QLabel will try to
auto-detect the format of the text set.
See \l {Supported HTML Subset} for the definition of rich text.
If a buddy has been set, the buddy mnemonic key is updated
from the new text.

View File

@ -358,8 +358,9 @@ void QTextEditPrivate::_q_ensureVisible(const QRectF &_rect)
QTextEdit can display images, lists and tables. If the text is
too large to view within the text edit's viewport, scroll bars will
appear. The text edit can load both plain text and HTML files (a
subset of HTML 3.2 and 4).
appear. The text edit can load both plain text and rich text files.
Rich text is described using a subset of HTML 4 markup, refer to the
\l {Supported HTML Subset} page for more information.
If you just need to display a small piece of rich text use QLabel.