aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/animation.qdoc33
-rw-r--r--doc/src/declarative/qtbinding.qdoc6
-rw-r--r--doc/src/declarative/whatsnew.qdoc7
3 files changed, 45 insertions, 1 deletions
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 4ec1503bcf..ef01d14414 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -222,6 +222,39 @@ attributes such as \l {SpringAnimation::}{mass},
\o AnchorAnimation: used for animating an anchor change (see AnchorChanges)
\endlist
+\section1 Sharing Animation Instances
+
+Sharing animation instances between Transitions or Behaviors is not
+supported, and may lead to undefined behavior. In the following example,
+changes to the Rectangle's position will most likely not be correctly animated.
+
+\qml
+Rectangle {
+ // NOT SUPPORTED: this will not work correctly as both Behaviors
+ // try to control a single animation instance
+ NumberAnimation { id: anim; duration: 300; easing.type: Easing.InBack }
+ Behavior on x { animation: anim }
+ Behavior on y { animation: anim }
+}
+\endqml
+
+The easiest fix is to repeat the NumberAnimation for both Behaviors. If the repeated
+animation is rather complex, you might also consider creating a custom animation
+component and assigning an instance to each Behavior, for example:
+
+\qml
+// MyNumberAnimation.qml
+NumberAnimation { id: anim; duration: 300; easing.type: Easing.InBack }
+\endqml
+
+\qml
+// main.qml
+Rectangle {
+ Behavior on x { MyNumberAnimation {} }
+ Behavior on y { MyNumberAnimation {} }
+}
+\endqml
+
*/
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 0d9928753e..5c125b25d3 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -511,12 +511,16 @@ the \l {Extending QML Functionalities using C++} reference documentation for
more information.
-\section2 Using Enumeration Values as Signal Parameters
+\section2 Using Enumeration Values as Signal and Method Parameters
C++ signals may pass enumeration values as signal parameters to QML, providing that the enumeration
and the signal are declared within the same class, or that the enumeration value is one of those declared
in the \l {Qt}{Qt Namespace}.
+Likewise, invokable C++ method parameters may be enumeration values providing
+that the enumeration and the method are declared within the same class, or that
+the enumeration value is one of those declared in the \l {Qt}{Qt Namespace}.
+
Additionally, if a C++ signal with an enum parameter should be connectable to a QML function using the
\l{QML Signal and Handler Event System#Connecting Signals to Methods and Signals}{connect()}
function, the enum type must be registered using qRegisterMetaType().
diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc
index f9b6683fa2..1eb64f97c5 100644
--- a/doc/src/declarative/whatsnew.qdoc
+++ b/doc/src/declarative/whatsnew.qdoc
@@ -45,6 +45,13 @@ QDeclarativeScriptString.
Flickable: added dragging, draggingHorizontally and draggingVerically properties.
+Image has two new properties: horizontalAlignment and verticalAlignment. It also has a new value for
+fillMode (Image.Pad) that does not transform the image.
+
+The Loader element now only emits the \c sourceChanged signal when the source is changed and the
+\c sourceComponentChanged signal when the sourceComponent is changed. It used to emit both signals when one
+of the properties was changed.
+
\section2 QtQuick 1 is now a separate library and module
Writing C++ applications using QtQuick 1 specific API, i.e. QDeclarativeView or QDeclarativeItem