diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-11 01:13:37 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-11 01:57:02 (GMT) |
commit | ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb (patch) | |
tree | eccc035f60887e74cf5553763c64006db8c00f46 /src/declarative/graphicsitems/qdeclarativetext.cpp | |
parent | aa30b0002573b5377b17f26f9fd72ca7d098a36c (diff) | |
download | Qt-ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb.zip Qt-ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb.tar.gz Qt-ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb.tar.bz2 |
Doc improvements, including snippet fixes, linking to examples, making
docs more consistent
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetext.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 3b89ad9..0fe3c74 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -119,8 +119,6 @@ QSet<QUrl> QTextDocumentWithImageResources::errors; A Text item can display both plain and rich text. For example: \qml - import Qt 4.7 - Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" } Text { text: "<b>Hello</b> <i>World!</i>" } \endqml @@ -128,10 +126,10 @@ QSet<QUrl> QTextDocumentWithImageResources::errors; \image declarative-text.png If height and width are not explicitly set, Text will attempt to determine how - much room is needed and set it accordingly. Unless \c wrapMode is set, it will always + much room is needed and set it accordingly. Unless \l wrapMode is set, it will always prefer width to height (all text will be placed on a single line). - The \c elide property can alternatively be used to fit a single line of + The \l elide property can alternatively be used to fit a single line of plain text to a set width. Note that the \l{Supported HTML Subset} is limited. Also, if the text contains @@ -507,13 +505,11 @@ void QDeclarativeText::setVAlign(VAlignment align) wrap if an explicit width has been set. wrapMode can be one of: \list - \o Text.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width. - \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width. + \o Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then \l paintedWidth will exceed a set width. + \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, \l paintedWidth will exceed a set width. \o Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word. \o Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word. \endlist - - The default is Text.NoWrap. */ QDeclarativeText::WrapMode QDeclarativeText::wrapMode() const { @@ -543,13 +539,13 @@ void QDeclarativeText::setWrapMode(WrapMode mode) Supported text formats are: \list - \o Text.AutoText + \o Text.AutoText (default) \o Text.PlainText \o Text.RichText \o Text.StyledText \endlist - The default is Text.AutoText. If the text format is Text.AutoText the text element + If the text format is \c Text.AutoText the text element will automatically determine whether the text should be treated as rich text. This determination is made using Qt::mightBeRichText(). |