summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetext.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-12 05:18:17 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-12 05:18:17 +0200
commited45391e2d846d030b2ebb98c083ffe97f52b2df (patch)
tree8d2735ed4109483f05e6bfbe4fbb03cd84fc5157 /src/declarative/graphicsitems/qdeclarativetext.cpp
parenta653056f806a3410b4aa76df78fae736d4f93791 (diff)
parent1628df4ab8f46d23a5c733b1b4f4de47f0691b9a (diff)
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (53 commits) ListView.onRemove animation is not played when the list has only one item. Move listview/itemlist.qml to a separate visualitemmodel example Make snapping work properly for highlight ranges > item size Fix test - sizeHint should not change after initial load. Also use Minor doc fixes Doc improvements, including snippet fixes, linking to examples, making Fix qmlviewer test failure on windows Do not keep flush timer running once no pixmaps are detached. Avoid recursive refill() in List/GridView Make snippet compile and pass license test, and add missing snippet file Remove accidentaly added characters. Update on color change. Update on color change. Add go button to webbrowser example. Remove 'XXX Experimental' from VisualItemModel/VisualDataModel and Document attached properties Add 'on' prefix to documentation of signals Stablize qmlviewer test Improve test stability. qmlviewer: ensure that only clicks on the current file list are handled. ...
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index f4722c3513..c2e0d672bc 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
@@ -163,7 +161,7 @@ QSet<QUrl> QTextDocumentWithImageResources::errors;
The \c elide property can alternatively be used to fit a line of plain text to a set width.
- A QDeclarativeText object can be instantiated in Qml using the tag \c Text.
+ A QDeclarativeText object can be instantiated in QML using the tag \c Text.
*/
QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent)
: QDeclarativeItem(*(new QDeclarativeTextPrivate), parent)
@@ -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().
@@ -1171,7 +1167,7 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
/*!
- \qmlsignal Text::linkActivated(link)
+ \qmlsignal Text::onLinkActivated(link)
This handler is called when the user clicks on a link embedded in the text.
*/