summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-04-14 16:53:23 +0200
committerEike Ziller <eike.ziller@digia.com>2014-04-14 16:53:23 +0200
commit8c1c106a4ff3df961d941cf612b29abeb69d4580 (patch)
tree25dfde210225f469e296ad88c05611d366fbebe1 /doc
parent7bce07f192d2fc8a80eace37c08db48aa4e82cd5 (diff)
parente6f868572d055a1b95d6ec564d2572aa127fd096 (diff)
downloadqt-creator-8c1c106a4ff3df961d941cf612b29abeb69d4580.tar.gz
Merge remote-tracking branch 'origin/3.1'
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/transitions/main.qml170
-rw-r--r--doc/images/qmldesigner-tutorial-desing-mode.pngbin107632 -> 106183 bytes
-rw-r--r--doc/images/qmldesigner-tutorial-page.pngbin37797 -> 20942 bytes
-rw-r--r--doc/images/qmldesigner-tutorial-project.pngbin42317 -> 101706 bytes
-rw-r--r--doc/images/qmldesigner-tutorial-state1.pngbin9920 -> 0 bytes
-rw-r--r--doc/images/qt-creator-debugging-helpers.pngbin25888 -> 27165 bytes
-rw-r--r--doc/snippets/qml/list-of-transitions.qml31
-rw-r--r--doc/snippets/qml/states-properties.qml24
-rw-r--r--doc/src/overview/creator-overview.qdoc4
-rw-r--r--doc/src/projects/creator-projects-compilers.qdoc6
-rw-r--r--doc/src/projects/creator-projects-qt-versions.qdoc8
-rw-r--r--doc/src/qtquick/qtquick-app-tutorial.qdoc97
-rw-r--r--doc/src/qtquick/qtquick-creating.qdoc2
13 files changed, 152 insertions, 190 deletions
diff --git a/doc/examples/transitions/main.qml b/doc/examples/transitions/main.qml
index 9e751ab842..8769546257 100644
--- a/doc/examples/transitions/main.qml
+++ b/doc/examples/transitions/main.qml
@@ -1,13 +1,9 @@
-//! [2]
+import QtQuick 2.1
+import QtQuick.Window 2.1
-//! [1]
-
-//! [0]
-
-import QtQuick 2.0
-
-Rectangle {
+Window {
id: page
+ visible: true
width: 360
height: 360
color: "#343434"
@@ -21,11 +17,11 @@ Rectangle {
Rectangle {
id: topLeftRect
- y: 20
width: 64
height: 64
color: "#00000000"
radius: 6
+ opacity: 1
anchors.left: parent.left
anchors.leftMargin: 10
anchors.top: parent.top
@@ -33,95 +29,95 @@ Rectangle {
border.color: "#808080"
MouseArea {
- id: mousearea1
+ id: mouseArea1
anchors.fill: parent
- onClicked: page.state = ' '
- }
+ onClicked: stateGroup.state = ' '
}
-//! [0]
+ }
- Rectangle {
- id: middleRightRect
- width: 64
- height: 64
- color: "#00000000"
- radius: 6
- anchors.right: parent.right
- anchors.rightMargin: 10
- anchors.verticalCenter: parent.verticalCenter
- border.color: "#808080"
- MouseArea {
- id: mousearea2
- anchors.fill: parent
- onClicked: page.state = 'State1'
- }
- }
+ Rectangle {
+ id: middleRightRect
+ width: 64
+ height: 64
+ color: "#00000000"
+ radius: 6
+ anchors.right: parent.right
+ anchors.rightMargin: 10
+ anchors.verticalCenter: parent.verticalCenter
+ border.color: "#808080"
- Rectangle {
- id: bottomLeftRect
- width: 64
- height: 64
- color: "#00000000"
- radius: 6
- anchors.left: parent.left
- anchors.leftMargin: 10
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 20
- border.color: "#808080"
- MouseArea {
- id: mousearea3
- anchors.fill: parent
- onClicked: page.state = 'State2'
- }
+ MouseArea {
+ id: mouseArea2
+ anchors.fill: parent
+ onClicked: stateGroup.state = 'State1'
}
+ }
-//! [1]
-
- states: [
- State {
- name: "State1"
+ Rectangle {
+ id: bottomLeftRect
+ width: 64
+ height: 64
+ color: "#00000000"
+ radius: 6
+ border.width: 1
+ anchors.leftMargin: 10
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 20
+ anchors.left: parent.left
+ border.color: "#808080"
- PropertyChanges {
- target: icon
- x: middleRightRect.x
- y: middleRightRect.y
- }
- },
- State {
- name: "State2"
+ MouseArea {
+ id: mouseArea3
+ anchors.fill: parent
+ onClicked: stateGroup.state = 'State2'
+ }
+ }
- PropertyChanges {
- target: icon
- x: bottomLeftRect.x
- y: bottomLeftRect.y
- }
- }
- ]
+ StateGroup {
+ id: stateGroup
+ states: [
+ State {
+ name: "State1"
- transitions: [
- Transition {
- from: "*"; to: "State1"
- NumberAnimation {
- easing.type: Easing.OutBounce
- properties: "x,y";
- duration: 1000
+ PropertyChanges {
+ target: icon
+ x: middleRightRect.x
+ y: middleRightRect.y
}
},
- Transition {
- from: "*"; to: "State2"
- NumberAnimation {
- properties: "x,y";
- easing.type: Easing.InOutQuad;
- duration: 2000
+ State {
+ name: "State2"
+
+ PropertyChanges {
+ target: icon
+ x: bottomLeftRect.x
+ y: bottomLeftRect.y
}
- },
- Transition {
- NumberAnimation {
- properties: "x,y";
- duration: 200
- }
- }
+ }
]
+ transitions: [
+ Transition {
+ from: "*"; to: "State1"
+ NumberAnimation {
+ easing.type: Easing.OutBounce
+ properties: "x,y";
+ duration: 1000
+ }
+ },
+ Transition {
+ from: "*"; to: "State2"
+ NumberAnimation {
+ properties: "x,y";
+ easing.type: Easing.InOutQuad;
+ duration: 2000
+ }
+ },
+ Transition {
+ NumberAnimation {
+ properties: "x,y";
+ duration: 200
+ }
+ }
+ ]
+ }
}
-
-//! [2]
diff --git a/doc/images/qmldesigner-tutorial-desing-mode.png b/doc/images/qmldesigner-tutorial-desing-mode.png
index 7d7f4bdc53..1cd9f9e775 100644
--- a/doc/images/qmldesigner-tutorial-desing-mode.png
+++ b/doc/images/qmldesigner-tutorial-desing-mode.png
Binary files differ
diff --git a/doc/images/qmldesigner-tutorial-page.png b/doc/images/qmldesigner-tutorial-page.png
index b914c44ebe..8148788ae1 100644
--- a/doc/images/qmldesigner-tutorial-page.png
+++ b/doc/images/qmldesigner-tutorial-page.png
Binary files differ
diff --git a/doc/images/qmldesigner-tutorial-project.png b/doc/images/qmldesigner-tutorial-project.png
index 1486929f22..f03bb501dd 100644
--- a/doc/images/qmldesigner-tutorial-project.png
+++ b/doc/images/qmldesigner-tutorial-project.png
Binary files differ
diff --git a/doc/images/qmldesigner-tutorial-state1.png b/doc/images/qmldesigner-tutorial-state1.png
deleted file mode 100644
index a9242f998a..0000000000
--- a/doc/images/qmldesigner-tutorial-state1.png
+++ /dev/null
Binary files differ
diff --git a/doc/images/qt-creator-debugging-helpers.png b/doc/images/qt-creator-debugging-helpers.png
index 5d3d7f56ae..9a1faa6fc2 100644
--- a/doc/images/qt-creator-debugging-helpers.png
+++ b/doc/images/qt-creator-debugging-helpers.png
Binary files differ
diff --git a/doc/snippets/qml/list-of-transitions.qml b/doc/snippets/qml/list-of-transitions.qml
deleted file mode 100644
index cf4f9df6a6..0000000000
--- a/doc/snippets/qml/list-of-transitions.qml
+++ /dev/null
@@ -1,31 +0,0 @@
-Item {
- transitions: [
- //! [first transition]
- Transition {
- from: "*"; to: "State1"
- NumberAnimation {
- properties: "x,y";
- duration: 1000
- }
- },
- //! [first transition]
- //! [second transition]
- Transition {
- from: "*"; to: "State2"
- NumberAnimation {
- properties: "x,y";
- easing.type: Easing.InOutQuad;
- duration: 2000
- }
- },
- //! [second transition]
- //! [default transition]
- Transition {
- NumberAnimation {
- properties: "x,y";
- duration: 200
- }
- }
- ]
- //! [default transition]
-}
diff --git a/doc/snippets/qml/states-properties.qml b/doc/snippets/qml/states-properties.qml
deleted file mode 100644
index b32f9eff18..0000000000
--- a/doc/snippets/qml/states-properties.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-Item {
- //! [states]
- states: [
- State {
- name: "State1"
-
- PropertyChanges {
- target: icon
- x: middleRightRect.x
- y: middleRightRect.y
- }
- },
- State {
- name: "State2"
-
- PropertyChanges {
- target: icon
- x: bottomLeftRect.x
- y: bottomLeftRect.y
- }
- }
- ]
- //! [states]
-}
diff --git a/doc/src/overview/creator-overview.qdoc b/doc/src/overview/creator-overview.qdoc
index 7e5cebd690..792c54bd3d 100644
--- a/doc/src/overview/creator-overview.qdoc
+++ b/doc/src/overview/creator-overview.qdoc
@@ -111,6 +111,8 @@
devices that are suitable for publishing to application stores
and other channels. You must make sure that the package contents
meet the requirements for publishing on the channel.
- \endtable
+
+ For more information, see \l{Publishing to Google Play}.
+\endtable
*/
diff --git a/doc/src/projects/creator-projects-compilers.qdoc b/doc/src/projects/creator-projects-compilers.qdoc
index 345ef9565d..285b491d5d 100644
--- a/doc/src/projects/creator-projects-compilers.qdoc
+++ b/doc/src/projects/creator-projects-compilers.qdoc
@@ -57,12 +57,16 @@
\li Clang is a C, C++, Objective C, and Objective C++ front-end for the
LLVM compiler for Windows, Linux, and Mac OS X.
+ \li QCC is the interface for compiling C++ applications for QNX.
+
\endlist
- To build an application using GCC, MinGW, or Clang, specify the path
+ To build an application using GCC, MinGW, Clang, or QCC, specify the path
to the directory where the compiler is located and select
the application binary interface (ABI) version from the list of available
versions. You can also create a custom ABI definition.
+ For QCC, also specify the path to the BlackBerry NDK or the QNX Software
+ Development Platform (SDP).
You specify the compiler to use for each kit in \gui Tools >
\gui Options > \gui {Build & Run} > \gui Kits.
diff --git a/doc/src/projects/creator-projects-qt-versions.qdoc b/doc/src/projects/creator-projects-qt-versions.qdoc
index 8f86f9af80..293191a001 100644
--- a/doc/src/projects/creator-projects-qt-versions.qdoc
+++ b/doc/src/projects/creator-projects-qt-versions.qdoc
@@ -66,11 +66,9 @@
\li In the \gui{qmake location} field, you can change the qmake
location.
- \li In the \gui Helpers section, select \gui Details to build the debugging
- helpers that are available for the Qt version. This is
- necessary, because the internal data structures of Qt can
- change between versions. For more information, see
- \l{Using Debugging Helpers}.
+ \li In the \gui Helpers section, select \gui Details to view the
+ QML Dumper that has been built for the Qt version. For more
+ information, see \l{Using Debugging Helpers}.
\image qt-creator-debugging-helpers.png
diff --git a/doc/src/qtquick/qtquick-app-tutorial.qdoc b/doc/src/qtquick/qtquick-app-tutorial.qdoc
index 3675b9a8d3..15a8cae8f8 100644
--- a/doc/src/qtquick/qtquick-app-tutorial.qdoc
+++ b/doc/src/qtquick/qtquick-app-tutorial.qdoc
@@ -33,8 +33,8 @@
This tutorial uses built-in QML types and illustrates basic concepts of
\l{Qt Quick}.
- This tutorial describes how to use \QC to implement Qt states and transitions. We use
- \l{Animation}{Qt example code} to
+ This tutorial describes how to use \QC to implement Qt Quick states and
+ transitions. We
create an application that displays a Qt logo that moves between three rectangles on the
page when you click them.
@@ -57,11 +57,7 @@
Windows and Linux) or \gui Continue (on Mac OS).
\li In the \gui {Qt Quick component set} field, select
- \gui {Qt Quick 2.0}.
-
- \note The QML types used in this example are also supported in
- Qt Quick 1.1. To create this example application for platforms that
- run Qt 4, select \gui {Qt Quick 1.1}.
+ \gui {Qt Quick 2.1}.
\li Select \l{glossary-buildandrun-kit}{kits} for running and building your project,
and then click \gui{Next}.
@@ -92,7 +88,8 @@
To use the states.png image in your application, you must copy it to the
project directory (same subdirectory as the QML file) from the examples
directory in the Qt installation directory. For example:
- \c {C:\Qt\Qt5.0.1\5.0.1\msvc2010\examples\declarative\animation\states}. The image appears
+ \c {C:\Qt\Qt5.3.0\5.3.0\msvc2010\examples\declarative\animation\states}. The
+ image appears
in the \gui Resources pane. You can also use any other image or a QML
type, instead.
@@ -108,18 +105,22 @@
\li In the \gui Navigator pane, select \gui Text and press \key Delete to
delete it.
- \li Select \gui Rectangle to edit its properties.
+ \li Select \gui Window to edit its properties.
\image qmldesigner-tutorial-page.png "Page properties"
\list a
\li In the \gui Id field, enter \e page, to be able to reference the
- rectangle from other places.
+ window from other places.
+
+ \li In the code editor, set the window background color to #343434:
- \li In the \gui Color field, set the color to #343434.
+ \quotefromfile transitions/main.qml
+ \skipto Window {
+ \printuntil color
- \li In the code editor, delete the \c {Qt.quit();} command.
+ \li Delete the \c {Qt.quit();} command.
\endlist
@@ -136,7 +137,13 @@
\endlist
- \li In the \gui Library view, \gui {QML Types} tab, select \gui Rectangle,
+ \li Double-click the resource file, qml.qrc, in the \gui Projects view
+ to add states.png to the resource file for deployment.
+
+ \li Click \gui Add and select states.png.
+
+ \li In the \gui Design mode, \gui Library view, \gui {QML Types} tab,
+ select \gui Rectangle,
drag and drop it to the canvas, and edit its properties.
\image qmldesigner-tutorial-topleftrect.png "Rectangle properties"
@@ -194,21 +201,24 @@
in the mouse area, as illustrated by the following code
snippet:
- \qml
- MouseArea {
- anchors.fill: parent
- onClicked: page.state = ''
- }
- \endqml
+ \quotefromfile transitions/main.qml
+ \skipto MouseArea
+ \printuntil }
The expression sets the state to the base state and returns the
image to its initial position.
+ You will create stateGroup later.
\endlist
The qml.main file should now look as follows:
- \snippet transitions/main.qml 0
+ \quotefromfile transitions/main.qml
+ \skipto Window {
+ \printuntil onClicked
+ \printuntil }
+ \printuntil }
+ \printuntil }
\li In the \gui Navigator pane, copy topLeftRect (by pressing
\key {Ctrl+C}) and paste it to the canvas twice (by pressing
@@ -232,7 +242,7 @@
mouse area. The following expression sets the state to
\e State1:
- \c {onClicked: page.state = 'State1'}
+ \c {onClicked: stateGroup.state = 'State1'}
You will create State1 later.
@@ -254,13 +264,18 @@
mouse area. The following expression sets the state to
\e State2:
- \c {onClicked: page.state = 'State2'}
+ \c {onClicked: stateGroup.state = 'State2'}
You will create State2 later.
The qml.main file should now look as follows:
- \snippet transitions/main.qml 1
+ \quotefromfile transitions/main.qml
+ \skipto Window {
+ \printuntil State2
+ \printuntil }
+ \printuntil }
+ \printuntil }
\endlist
@@ -280,26 +295,21 @@
\section1 Adding Views
In the .qml file, you already created pointers to two additional states:
- State1 and State2. To create the states:
+ State1 and State2. You cannot use the \QMLD to add states for a Window QML
+ type. Use the code editor to add the states inside a StateGroup QML type and
+ refer to them by using the id of the state group:
\list 1
- \li Click the empty slot in the \gui States pane to create State1.
-
- \li Click the empty slot in the \gui States pane to create State2.
-
- \li In the code editor, bind the position of the Qt logo to the
+ \li Bind the position of the Qt logo to the
rectangle to make sure that the logo is displayed within the
rectangle when the view is scaled on different sizes of screens. Set
expressions for the x and y properties, as illustrated by the
following code snippet:
- \snippet qml/states-properties.qml states
-
- \image qmldesigner-tutorial-state1.png "States"
-
- \note When you set the expressions, drag and drop is disabled for
- the icon in \QMLD.
+ \quotefromfile transitions/main.qml
+ \skipto StateGroup {
+ \printuntil ]
\li Press \key {Ctrl+R} to run the application.
@@ -309,7 +319,8 @@
\section1 Adding Animation to the View
- Add transitions to define how the properties change when the Qt logo moves
+ Add transitions inside the state group to define how the properties change
+ when the Qt logo moves
between states. The transitions apply animations to the Qt logo. For example,
the Qt logo bounces back when it moves to the middleRightRect and eases into
bottomLeftRect. Add the transitions in the code editor.
@@ -320,7 +331,9 @@
moving to State1, the x and y coordinates of the Qt logo change
linearly over a duration of 1 second:
- \snippet qml/list-of-transitions.qml first transition
+ \dots
+ \skipto transitions
+ \printuntil },
\li You can use the Qt Quick toolbar for animation to change the easing
curve type from linear to OutBounce:
@@ -343,13 +356,15 @@
and y coordinates of the Qt logo change over a duration of 2
seconds, and an InOutQuad easing function is used:
- \snippet qml/list-of-transitions.qml second transition
+ \dots
+ \printuntil },
\li Add the following code to specify that for any other state changes,
the x and y coordinates of the Qt logo change linearly over a
duration of 200 milliseconds:
- \snippet qml/list-of-transitions.qml default transition
+ \dots
+ \printuntil ]
\li Press \key {Ctrl+R} to run the application.
@@ -361,6 +376,8 @@
When you have completed the steps, the main.qml file should look as follows:
- \snippet transitions/main.qml 2
+ \quotefromfile transitions/main.qml
+ \skipto Window {
+ \printuntil /^\}/
*/
diff --git a/doc/src/qtquick/qtquick-creating.qdoc b/doc/src/qtquick/qtquick-creating.qdoc
index 73cadde517..1d858a9c48 100644
--- a/doc/src/qtquick/qtquick-creating.qdoc
+++ b/doc/src/qtquick/qtquick-creating.qdoc
@@ -75,7 +75,7 @@
\list
- \li Select \gui {Qt Quick Controls 1.0} or \gui {Qt Quick 2.0} to
+ \li Select \gui {Qt Quick Controls 1.1} or \gui {Qt Quick 2.2} to
develop for platforms that run Qt 5.
\li Select \gui {Qt Quick 1.1} to develop for platforms that run