summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-07-25 13:57:13 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-07-25 13:57:13 +0200
commitae8ac2eb2f118cfb96efec7a40aa8d55be2704ee (patch)
treefd36ac3e15c7c243d890d5e91544af5307f8c9fc /doc
parent76a5b1953ca230d813340a9d536d636aacd0929b (diff)
parent899cc0300336a51f0d553c10d0769b145f99af00 (diff)
downloadqt-creator-ae8ac2eb2f118cfb96efec7a40aa8d55be2704ee.tar.gz
Merge branch '2.3'
Conflicts: qtcreator.pri src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp src/plugins/remotelinux/maemodeploystepfactory.cpp src/plugins/remotelinux/maemodirectdeviceuploadstep.cpp Change-Id: I195163713145e72df20aec4ac9058f0c9158083e
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/batterystatus/BatteryStatus.pro73
-rw-r--r--doc/examples/batterystatus/main.cpp51
-rw-r--r--doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml82
-rw-r--r--doc/examples/batterystatus/qml/BatteryStatus/main.qml71
-rw-r--r--doc/images/qmldesigner-boolean-false-blue.pngbin0 -> 816 bytes
-rw-r--r--doc/images/qmldesigner-boolean-false.pngbin0 -> 756 bytes
-rw-r--r--doc/images/qmldesigner-boolean-true-blue.pngbin0 -> 1033 bytes
-rw-r--r--doc/images/qmldesigner-boolean-true.pngbin0 -> 980 bytes
-rw-r--r--doc/images/qmldesigner-properties-explicit-base.pngbin0 -> 31099 bytes
-rw-r--r--doc/images/qmldesigner-properties-explicit-state1.pngbin0 -> 29951 bytes
-rw-r--r--doc/images/qtcreator-new-project-qt-versions-qt-gui.pngbin45327 -> 19949 bytes
-rw-r--r--doc/images/qtcreator-symbian-components-example-simulated.pngbin0 -> 89848 bytes
-rw-r--r--doc/images/qtcreator-symbian-components-example-ui.pngbin0 -> 67075 bytes
-rw-r--r--doc/images/qtcreator-symbian-components-example.pngbin0 -> 43251 bytes
-rw-r--r--doc/qtcreator.qdoc406
15 files changed, 661 insertions, 22 deletions
diff --git a/doc/examples/batterystatus/BatteryStatus.pro b/doc/examples/batterystatus/BatteryStatus.pro
new file mode 100644
index 0000000000..a5a6df68f1
--- /dev/null
+++ b/doc/examples/batterystatus/BatteryStatus.pro
@@ -0,0 +1,73 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (info@qt.nokia.com)
+**
+** This file is part of the documentation of Qt Creator.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
+# Add more folders to ship with the application, here
+folder_01.source = qml/BatteryStatus
+folder_01.target = qml
+DEPLOYMENTFOLDERS = folder_01
+
+# Additional import path used to resolve QML modules in Creator's code model
+QML_IMPORT_PATH =
+
+symbian:TARGET.UID3 = 0xE54A5459
+
+# Smart Installer package's UID
+# This UID is from the protected range and therefore the package will
+# fail to install if self-signed. By default qmake uses the unprotected
+# range value if unprotected UID is defined for the application and
+# 0x2002CCCF value if protected UID is given to the application
+#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
+
+# Allow network access on Symbian
+symbian:TARGET.CAPABILITY += NetworkServices
+
+# If your application uses the Qt Mobility libraries, uncomment the following
+# lines and add the respective components to the MOBILITY variable.
+CONFIG += mobility
+MOBILITY += systeminfo
+
+# Add dependency to symbian components
+CONFIG += qtquickcomponents
+
+# The .cpp file which was generated for your project. Feel free to hack it.
+SOURCES += main.cpp
+
+# Please do not modify the following two lines. Required for deployment.
+include(qmlapplicationviewer/qmlapplicationviewer.pri)
+qtcAddDeployment()
+
diff --git a/doc/examples/batterystatus/main.cpp b/doc/examples/batterystatus/main.cpp
new file mode 100644
index 0000000000..aedc7075a3
--- /dev/null
+++ b/doc/examples/batterystatus/main.cpp
@@ -0,0 +1,51 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (info@qt.nokia.com)
+**
+** This file is part of the documentation of Qt Creator.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
+#include <QtGui/QApplication>
+#include "qmlapplicationviewer.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QmlApplicationViewer viewer;
+ viewer.setMainQmlFile(QLatin1String("qml/BatteryStatus/main.qml"));
+ viewer.showExpanded();
+
+ return app.exec();
+}
diff --git a/doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml b/doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml
new file mode 100644
index 0000000000..2959ad190a
--- /dev/null
+++ b/doc/examples/batterystatus/qml/BatteryStatus/MainPage.qml
@@ -0,0 +1,82 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (info@qt.nokia.com)
+**
+** This file is part of the documentation of Qt Creator.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import com.nokia.symbian 1.0
+import QtMobility.systeminfo 1.1
+
+//! [0]
+Page {
+ id: mainPage
+
+ DeviceInfo {
+ id: deviceinfo
+
+ Component.onCompleted: {
+ deviceinfo.startBatteryLevelChanged();
+ }
+ onBatteryLevelChanged: {
+ progressbar1.value = batteryLevel
+ }
+ }
+//! [0]
+
+//! [1]
+ Text {
+ id: text1
+ x: 0
+ color: platformStyle.colorNormalLight
+ text: qsTr("Battery status: %1%").arg(progressbar1.value)
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ font.pixelSize: 20
+ }
+//! [1]
+
+//! [2]
+ ProgressBar {
+ id: progressbar1
+ anchors.horizontalCenter: text1.horizontalCenter
+ anchors.top: text1.bottom
+ anchors.topMargin: 20
+ minimumValue: 0
+ maximumValue: 100
+ value: deviceinfo.batteryLevel
+ }
+//! [2]
+}
diff --git a/doc/examples/batterystatus/qml/BatteryStatus/main.qml b/doc/examples/batterystatus/qml/BatteryStatus/main.qml
new file mode 100644
index 0000000000..9c570b1db2
--- /dev/null
+++ b/doc/examples/batterystatus/qml/BatteryStatus/main.qml
@@ -0,0 +1,71 @@
+/***************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (info@qt.nokia.com)
+**
+** This file is part of the documentation of Qt Creator.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
+
+import QtQuick 1.0
+import com.nokia.symbian 1.0
+
+Window {
+ id: window
+
+ StatusBar {
+ id: statusBar
+ anchors.top: window.top
+ }
+
+ PageStack {
+ id: pageStack
+ anchors { left: parent.left; right: parent.right; top: statusBar.bottom; bottom: toolBar.top }
+ }
+
+ ToolBar {
+ id: toolBar
+ anchors.bottom: window.bottom
+ tools: ToolBarLayout {
+ id: toolBarLayout
+ ToolButton {
+ flat: true
+ iconSource: "toolbar-back"
+ onClicked: pageStack.depth <= 1 ? Qt.quit() : pageStack.pop()
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ pageStack.push(Qt.resolvedUrl("MainPage.qml"))
+ }
+}
diff --git a/doc/images/qmldesigner-boolean-false-blue.png b/doc/images/qmldesigner-boolean-false-blue.png
new file mode 100644
index 0000000000..43bf117511
--- /dev/null
+++ b/doc/images/qmldesigner-boolean-false-blue.png
Binary files differ
diff --git a/doc/images/qmldesigner-boolean-false.png b/doc/images/qmldesigner-boolean-false.png
new file mode 100644
index 0000000000..9226583632
--- /dev/null
+++ b/doc/images/qmldesigner-boolean-false.png
Binary files differ
diff --git a/doc/images/qmldesigner-boolean-true-blue.png b/doc/images/qmldesigner-boolean-true-blue.png
new file mode 100644
index 0000000000..c7f667d1c5
--- /dev/null
+++ b/doc/images/qmldesigner-boolean-true-blue.png
Binary files differ
diff --git a/doc/images/qmldesigner-boolean-true.png b/doc/images/qmldesigner-boolean-true.png
new file mode 100644
index 0000000000..e2817922ec
--- /dev/null
+++ b/doc/images/qmldesigner-boolean-true.png
Binary files differ
diff --git a/doc/images/qmldesigner-properties-explicit-base.png b/doc/images/qmldesigner-properties-explicit-base.png
new file mode 100644
index 0000000000..4833624639
--- /dev/null
+++ b/doc/images/qmldesigner-properties-explicit-base.png
Binary files differ
diff --git a/doc/images/qmldesigner-properties-explicit-state1.png b/doc/images/qmldesigner-properties-explicit-state1.png
new file mode 100644
index 0000000000..2a58312204
--- /dev/null
+++ b/doc/images/qmldesigner-properties-explicit-state1.png
Binary files differ
diff --git a/doc/images/qtcreator-new-project-qt-versions-qt-gui.png b/doc/images/qtcreator-new-project-qt-versions-qt-gui.png
index 8e234843f7..5f0745fd90 100644
--- a/doc/images/qtcreator-new-project-qt-versions-qt-gui.png
+++ b/doc/images/qtcreator-new-project-qt-versions-qt-gui.png
Binary files differ
diff --git a/doc/images/qtcreator-symbian-components-example-simulated.png b/doc/images/qtcreator-symbian-components-example-simulated.png
new file mode 100644
index 0000000000..f4bb6ff2e3
--- /dev/null
+++ b/doc/images/qtcreator-symbian-components-example-simulated.png
Binary files differ
diff --git a/doc/images/qtcreator-symbian-components-example-ui.png b/doc/images/qtcreator-symbian-components-example-ui.png
new file mode 100644
index 0000000000..d9093bdf19
--- /dev/null
+++ b/doc/images/qtcreator-symbian-components-example-ui.png
Binary files differ
diff --git a/doc/images/qtcreator-symbian-components-example.png b/doc/images/qtcreator-symbian-components-example.png
new file mode 100644
index 0000000000..fecf5e9daa
--- /dev/null
+++ b/doc/images/qtcreator-symbian-components-example.png
Binary files differ
diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc
index d91da785ea..be835f5fab 100644
--- a/doc/qtcreator.qdoc
+++ b/doc/qtcreator.qdoc
@@ -56,9 +56,11 @@
\o \l{Getting Started}
\list
\o \l{Building and Running an Example Application}
- \o \l{Creating a Qt Widget Based Application}
- \o \l{Creating a Mobile Application with Qt SDK}
\o \l{Creating a Qt Quick Application}
+ \o \l{Creating a Qt Quick Application Using Qt Quick Components}
+ \o \l{Creating a Qt Widget Based Application}
+ \o \l{Creating a Qt Widget Based Mobile Application}
+
\endlist
\o \l{Managing Projects}
\list
@@ -465,6 +467,13 @@
can change the information that the device has about its configuration
and environment.
+ Qt Simulator does not support any device specific APIs by design. Therefore,
+ applications that run well on Qt Simulator also run on any device that hosts
+ the Qt and Qt Mobility libraries. However, this means that you cannot use
+ Qt Simulator to test applications that use device specific libraries, such
+ as Symbian C++ APIs. To test such applications, use the device emulators or
+ real devices.
+
The Qt Simulator is installed as part of the \QSDK. After it is
installed, you can select it as a build target in Qt Creator.
@@ -1319,10 +1328,6 @@
\image qmldesigner-element-properties.png
- The default values of properties are displayed in white color, while the values
- that you specify explicitly are highlighted with blue color. In addition, property
- changes in states are highlighted with blue.
-
You can use a context-menu to reset some element properties. To reset the
position or size property of an element, right-click the element and select
\gui {Edit > Reset Position} or \gui {Reset Size} in the context menu. To
@@ -1330,6 +1335,56 @@
For more information on the properties available for an element, press \key {F1}.
+ \section2 Viewing Changes in Properties
+
+ The default values of properties are displayed in white color, while the
+ values that you specify explicitly are highlighted with blue color. In
+ addition, property changes in states are highlighted with blue.
+
+ This allows you to easily see which values are set in the .qml file and
+ which values are default characteristics of an element or a component.
+
+ When editing states, you can easily see which values are explicitly set in
+ the current state and which values are derived from the base state.
+
+ The following images illustrate this. In the base state, the \gui Position,
+ \gui Size, and \gui Colors values are explicitly set and highlighted.
+
+ \image qmldesigner-properties-explicit-base.png "Explicitly set properties"
+
+ In \gui State1, only the color is explicitly set and highlighted.
+
+ \image qmldesigner-properties-explicit-state1.png "Explicitly set properties"
+
+ Resetting a property sets it back to the default value and removes the value
+ from the .qml file.
+
+ \note As a result, all boolean values can be visualized in four different
+ ways.
+
+ For example, visibility can be visualized as follows:
+
+ \table
+ \row
+ \i \image qmldesigner-boolean-true.png
+ \i TRUE
+ \i The element is visible by default. The visibility might be
+ overridden by the visibility set in the base state.
+ \row
+ \i \image qmldesigner-boolean-true-blue.png
+ \i TRUE (highlighted)
+ \i The element is explicitly set to visible.
+ \row
+ \i \image qmldesigner-boolean-false.png
+ \i FALSE
+ \i The element is hidden by default. The visibility might be
+ overridden by the visibility set in the base state.
+ \row
+ \i \image qmldesigner-boolean-false-blue.png
+ \i FALSE (hightlighted)
+ \i The item is explicitly set to hidden.
+ \endtable
+
\section2 Setting Expressions
\l{http://doc.qt.nokia.com/4.7/propertybinding.html}{Property binding}
@@ -3177,7 +3232,7 @@
/*!
\contentspage index.html
- \previouspage creator-qml-application.html
+ \previouspage creator-mobile-example.html
\page creator-project-managing.html
\nextpage creator-project-creating.html
@@ -5930,9 +5985,228 @@
\list
\o \l{Building and Running an Example Application}
- \o \l{Creating a Qt Widget Based Application}
- \o \l{Creating a Mobile Application with Qt SDK}
\o \l{Creating a Qt Quick Application}
+ \o \l{Creating a Qt Quick Application Using Qt Quick Components}
+ \o \l{Creating a Qt Widget Based Application}
+ \o \l{Creating a Qt Widget Based Mobile Application}
+
+ \endlist
+
+*/
+
+
+/*!
+ \contentspage index.html
+ \previouspage creator-qml-application.html
+ \page creator-qml-components-example.html
+ \nextpage creator-writing-program.html
+
+ \title Creating a Qt Quick Application Using Qt Quick Components
+
+ \note To complete this tutorial, you must install the Qt Quick Components
+ for Symbian and the Symbian^3 tool chain as part of the \QSDK. In addition,
+ you must install the Qt Quick Components on the test device.
+
+ This tutorial describes how to use Qt Creator to create a small Qt
+ application, Battery Status, that uses the System Information
+ Mobility API to fetch battery information from the device.
+
+ \image qtcreator-symbian-components-example.png "Mobile example"
+
+ The user interface for the application is designed using Qt Quick Components
+ for Symbian. This enforces a platform look and feel for Symbian^3 devices.
+
+ \section1 Creating the Project
+
+ \list 1
+
+ \o Select \gui{File > New File or Project > Qt Quick Project > Qt Quick
+ Application > Choose}.
+
+ \o In the \gui{Name} field, type \bold {BatteryStatus}.
+
+ \o In the \gui {Create in} field, enter the path for the project files.
+ For example, \c {C:\Qt\examples}, and then click \gui{Next}.
+
+ \o In the \gui {Application Type} dialog, select \gui {Qt Quick
+ Components (Symbian Applications)}, and then click \gui{Next}.
+
+ \o Select \gui {Symbian Device} and \gui {Qt Simulator} targets, and
+ then click \gui{Next}.
+
+ \note Targets are listed if you installed the appropriate
+ development environment, for example, as part of the \QSDK. You can
+ add targets later in the \gui Projects mode.
+
+ \o Select \gui Next in the following dialogs to use the default
+ settings.
+
+ \note Qt Creator contains a default program icon and generates an
+ \l{Application UID}, for testing the application on a device. You
+ only need to change the icon and UID if you deliver the application
+ for public use.
+
+ \o Review the project settings, and click \gui{Finish} to create the
+ project.
+
+ \endlist
+
+ Qt Creator generates the necessary files that contain boiler plate code. The
+ wizard creates an application that uses
+ \l{http://doc.qt.nokia.com/qt-components-symbian-1.0/qt-components-pages-and-navigation-overview.html}
+ {page-based application navigation}.
+
+ Modify the files as described in the following sections.
+
+ \section1 Declaring the Qt Mobility API
+
+ To use the Qt Mobility APIs or develop applications for Symbian
+ devices, you must modify the .pro file to declare the Qt Mobility APIs
+ that you use.
+
+ This example uses the System Info API, so you must declare it, as
+ illustrated by the following code snippet:
+
+ \code
+
+ CONFIG += mobility
+ MOBILITY = systeminfo
+
+ \endcode
+
+ Each Mobility API has its corresponding value that you have to add
+ as a value of MOBILITY to use the API. For a list of the APIs and the
+ corresponding values that you can assign to MOBILITY, see the
+ \l {http://doc.qt.nokia.com/qtmobility/quickstart.html}{Quickstart Example}.
+
+ \section1 Adding Import Statements
+
+ The wizard adds the import statements for Qt Quick and the Qt Quick
+ Components for Symbian to the MainPage.qml file:
+
+ \code
+ import QtQuick 1.0
+ import com.nokia.symbian 1.0
+ \endcode
+
+ To use the Qt Mobility APIs, you must add the import statements for the
+ Qt Mobility APIs that you use. This example uses the System Info API, so you
+ must import it, as illustrated by the following code snippet:
+
+ \code
+ import QtMobility.systeminfo 1.1
+ \endcode
+
+ Use the values as you can assign to MOBILITY also to construct import
+ statements.
+
+ \section1 Creating the Main View
+
+ Qt Creator generates a default QML file that you can modify to create the
+ main view of the application. It displays a progress bar and a text label
+ that indicate the battery status.
+
+ \list 1
+
+ \o Click \gui Design to open MainPage.qml in \QMLD.
+
+ \o In the \gui Navigator pane, select the \gui Text element to edit its
+ properties in the \gui Properties pane.
+
+ \o In the \gui Text field, change the text from \bold {Hello World!}
+ to \gui {Battery status: 1%}.
+
+ \o In the \gui Library view, \gui Items tab, select the
+ \gui ProgressBar element, drag and drop it to the canvas, and edit
+ its properties.
+
+ \image qtcreator-symbian-components-example-ui.png "Qt Quick Components for Symbian"
+
+ \list 1
+
+ \o Click \gui {Layout}, and then click the top anchor button.
+
+ \o In the \gui Target field, select \gui text1, to anchor the
+ progress bar to the bottom of the text field.
+
+ \o In the \gui Margin field, select 20.
+
+ \o Click the horizontal anchor button, and select \gui text1 in
+ the \gui Target field to anchor the progress bar
+ horizontally to the text field.
+
+ \o To check that the application can be built and run, select
+ \gui {Qt Simulator} as the target and click the
+ \inlineimage qtcreator-run.png
+ button.
+
+ \endlist
+
+ \endlist
+
+ \section1 Fetching Battery Status
+
+ To fetch the battery status, open MainPage.qml in the code editor and add
+ some code to it:
+
+ \list 1
+
+ \o Add an invisible
+ \l{http://doc.qt.nokia.com/qtmobility/qml-deviceinfo.html}
+ {DeviceInfo element} that contains two signals. The
+ \l{http://doc.qt.nokia.com/4.7/qml-component.html#onCompleted-signal}
+ {onCompleted} signal starts battery level notification when the
+ component is initialized. The
+ \l{http://doc.qt.nokia.com/qtmobility/qml-deviceinfo.html#batteryLevelChanged-signal}
+ {batteryLevelChanged} signal is called when the battery level
+ changes.
+
+ \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 0
+
+ \o Set an expression as the value of the text property of the Text
+ element to display the battery level as a percentage:
+
+ \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 1
+
+ \o Set values for the ProgressBar element to display the battery level
+ on the progress bar:
+
+ \snippet examples/batterystatus/qml/BatteryStatus/MainPage.qml 2
+
+ \endlist
+
+
+ \section1 Compiling and Running Your Program
+
+ Now that you have all the necessary code, select \gui {Qt Simulator}
+ as the target and click the
+ \inlineimage qtcreator-run.png
+ button to build your program and run it in the Qt Simulator.
+
+ In Qt Simulator, run the runOutOfBattery.qs example script
+ to see the value change in the Battery Indicator application.
+ Select \gui {Scripting > examples > runOutOfBattery.qs > Run}.
+
+ \image qtcreator-symbian-components-example-simulated.png "Mobile example in Qt Simulator"
+
+ \section1 Testing on a Symbian Device
+
+ You also need to test the application on real devices. Before you can
+ start testing on Symbian devices, you must connect them to the development
+ PC by using a USB cable and install the necessary software on them.
+
+ \list 1
+
+ \o Install Qt libraries, Qt mobile libraries, Qt Quick components for
+ Symbian, and a debugging agent on the device. For more information,
+ see \l{Connecting Symbian Devices}.
+
+ \o Start the CODA debugging agent on the device.
+
+ \o Click the \gui {Target Selector} and select \gui {Symbian Device}.
+
+ \o Click \gui Run to build the application for the Symbian device.
+
\endlist
*/
@@ -5942,9 +6216,9 @@
\contentspage index.html
\previouspage creator-writing-program.html
\page creator-mobile-example.html
- \nextpage creator-qml-application.html
+ \nextpage creator-project-managing.html
- \title Creating a Mobile Application with Qt SDK
+ \title Creating a Qt Widget Based Mobile Application
\note To complete this tutorial, you must install \QSDK.
The installation program installs and configures the necessary tool chains
@@ -5954,6 +6228,12 @@
application, Battery Indicator, that uses the System Information
Mobility API to fetch battery information from the device.
+ The user interface for the application is designed using Qt widgets. This
+ enforces a platform look and feel for Symbian devices and Maemo 5 devices.
+ However, to achieve a platform look and feel for MeeGo Harmattan devices,
+ \l{Creating Qt Quick Applications}{create a Qt Quick Application} and use
+ the Qt Quick components for MeeGo.
+
\image qtcreator-batteryindicator-screenshot.png
\section1 Creating the Battery Indicator Project
@@ -6200,7 +6480,7 @@
\contentspage index.html
\previouspage creator-getting-started.html
\page creator-build-example-application.html
- \nextpage creator-writing-program.html
+ \nextpage creator-qml-application.html
\title Building and Running an Example Application
@@ -6262,9 +6542,9 @@
/*!
\contentspage index.html
- \previouspage creator-mobile-example.html
+ \previouspage creator-build-example-application.html
\page creator-qml-application.html
- \nextpage creator-project-managing.html
+ \nextpage creator-qml-components-example.html
\title Creating a Qt Quick Application
@@ -6565,7 +6845,7 @@
/*!
\contentspage index.html
- \previouspage creator-build-example-application.html
+ \previouspage creator-qml-components-example.html
\page creator-writing-program.html
\nextpage creator-mobile-example.html
@@ -7939,6 +8219,9 @@
Symbol Server provided by Microsoft to the symbol search path of the debugger.
For more information, see \l{Setting the Symbol Server in Windows}.
+ \note To use the Free Software Foundation (FSF) GDB on Mac OS, you must
+ sign it and add it to Qt Creator as a tool chain.
+
This section explains the
options you have for debugging C++ code and provides installation notes for the
supported native debuggers.
@@ -7946,9 +8229,8 @@
\section1 Supported Native Debugger Versions
The debugger plugin supports different builds of the GDB debugger, both
- with and without the ability to use Python scripting. The Python enabled
- versions are preferred, but they are not available on Mac and on older
- versions of Linux.
+ with and without the ability to use Python scripting. Use a Python enabled
+ version if one is available.
On Windows, Symbian, Maemo, and MeeGo Harmattan, only the Python version is
supported.
@@ -7985,12 +8267,18 @@
\o Yes
\o Plain, Terminal, Attach, Remote, Core
\row
- \o Mac OS
+ \o Mac OS/GDB
\o GCC
\o GDB
\o No
\o Plain, Terminal, Attach, Core
\row
+ \o Mac OS/FSF GDB (experimental)
+ \o GCC
+ \o FSF GDB
+ \o Yes
+ \o Plain, Terminal, Attach, Core
+ \row
\o Windows/MinGW
\o GCC
\o GDB
@@ -8119,7 +8407,7 @@
\o The Qt binary distribution contains both debug and release
variants of the libraries. But you have to explicitly tell the
runtime linker that you want to use the debug libraries even if
- your application is compiled as debug as release is the default
+ your application is compiled as debug, as release is the default
library.
If you use a qmake based project in Qt Creator, you can set a
@@ -8127,9 +8415,17 @@
configuration, select \gui{Use debug version of frameworks}.
For more detailed information about debugging on the Mac OS X, see:
- \l{http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html}{Mac OS X Debugging Magic}.
+ \l{http://developer.apple.com/library/mac/#technotes/tn2124/_index.html#//apple_ref/doc/uid/DTS10003391}
+ {Mac OS X Debugging Magic}.
- \note The Mac OS X Snow Leopard (10.6) has a bug that might cause the
+ You can download an experimental version of FSF GDB that
+ supports Python from
+ \l{ftp://ftp.qt.nokia.com/misc/gdb/7.2/gdb72_mac_platform.tar.bz2}.
+ To use FSF GDB on Mac OS, you must sign it and add it to the Qt
+ Creator tool chains. For more information, see
+ \l{Setting up FSF GDB for Mac OS}.
+
+ \note The Mac OS X Snow Leopard (10.6) has a bug that might cause the
application to crash. For a workaround, see:
\l{http://bugreports.qt.nokia.com/browse/QTBUG-4962}{QTBUG-4962}.
@@ -8158,6 +8454,64 @@
Debugging tools for Windows, Qt Creator prompts you to add the Symbol
Server.
+ \section1 Setting up FSF GDB for Mac OS
+
+ To use FSF GDB on Mac OS, you must sign it and add it to the Qt Creator tool
+ chains.
+
+ \list 1
+
+ \o To create a key for signing FSF GDB, select \gui {Keychain Access >
+ Certificate Assistant > Create a Certificate}:
+
+ \list 1
+
+ \o In the \gui {Certificate Type} field, select \gui {Code Signing}.
+
+ \o Select the \gui {Let me override defaults} check box.
+
+ \o Select \gui Continue, and follow the instructions of the
+ wizard (use the default settings), until the \gui {Select a
+ Location for the Certificate} dialog opens.
+
+ \o In the \gui Keychain field, select \gui System.
+
+ \o Select \gui {Keychain Access > System}, and locate the
+ certificate.
+
+ \o Double click the certificate to view certificate information.
+
+ \o In the \gui Trust field, select \gui {Always Trust}.
+
+ \endlist
+
+ \o To sign the binary, enter the following command in the terminal,
+ where $USER is the name of the certificate (which is the same as the
+ user name, by default):
+
+ \code
+ codesign -f -s "$USER" $INSTALL_LOCATION/fsfgdb
+ \endcode
+
+ \o In Qt Creator, select \gui {Tools > Preferences… > Tool Chains}, to
+ add a tool chain that uses the debugger:
+
+ \list 1
+
+ \o Select a native tool chain (usually, a x86 64-bit tool chain)
+ and click \gui Clone to clone it.
+
+ \o In the \gui Debugger field, specify the path to FSF GDB
+ (\c $HOME/gdb72/bin/fsfgdb, but with an explicit value for
+ \c $HOME).
+
+ \endlist
+
+ \o To use the debugger, select the tool chain in the \gui {Tool chain}
+ field in the \gui {Build Settings} of the project.
+
+ \endlist
+
*/
/*!
@@ -9070,6 +9424,10 @@
\note You need Qt 4.7.1 or later to debug Qt Quick projects. Debugging projects
not created with the Qt Quick wizards is only supported with Qt 4.8, or later.
+ To debug Qt Quick applications running on devices, you must install
+ Qt 4.7.4, or later, libraries on devices. To debug applications on Symbian
+ devices, you must install also QML Viewer on them.
+
\section1 Setting Up QML Debugging
The process of setting up debugging for Qt Quick projects depends on the type of
@@ -9113,6 +9471,10 @@
\endlist
+ To debug Qt Quick Applications on devices, install Qt 4.7.4, or later,
+ libraries on devices. Then select the device as the target before you
+ start debugging.
+
\section1 Starting QML Debugging
To start the application, choose \gui {Debug > Start Debugging