diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-26 14:23:52 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-26 14:23:52 (GMT) |
commit | 20a3e23bb07a8c4b363ebeb9124d04db9fe3226e (patch) | |
tree | 5dcf25005d4f434d1dd95d712c135eaa56d860d3 /src/declarative | |
parent | 67fbf125f3f96ea0ff0da66b1dd8b7dd348ca69f (diff) | |
download | Qt-20a3e23bb07a8c4b363ebeb9124d04db9fe3226e.zip Qt-20a3e23bb07a8c4b363ebeb9124d04db9fe3226e.tar.gz Qt-20a3e23bb07a8c4b363ebeb9124d04db9fe3226e.tar.bz2 |
Doc: Fixed the syntax of QML code snippets.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativeanimation.cpp | 13 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativefontloader.cpp | 14 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 5dbde15..2f53f21 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -890,14 +890,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() then jump to \c Item.BottomRight. To fix this, insert a PropertyAction before the RotationAnimation begins: - \qml - transitions: Transition { - SequentialAnimation { - PropertyAction { target: rect; property: "transformOrigin" } - RotationAnimation { ... } - } - } - \endqml + \snippet doc/src/snippets/declarative/propertyaction-sequential.qml sequential This immediately sets the \c transformOrigin property to the value defined in the end state of the \l Transition (i.e. the value defined in the @@ -1186,7 +1179,9 @@ void QDeclarativeNumberAnimation::init() \qml Item { - states: [ ... ] + states: [ + // ... + ] transition: Transition { NumberAnimation { properties: "x"; from: 100; duration: 200 } diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index d39da3f..eba9cf9 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -262,8 +262,18 @@ void QDeclarativeFontLoader::updateFontInfo(const QString& name, QDeclarativeFon Example: \qml - FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" } - Text { text: "Fancy font"; font.family: webFont.name } + Item { + width: 200; height: 50 + + FontLoader { + id: webFont + source: "http://www.mysite.com/myfont.ttf" + } + Text { + text: "Fancy font" + font.family: webFont.name + } + } \endqml */ QString QDeclarativeFontLoader::name() const |