forked from qt-creator/qt-creator
Doc: update the tutorial app to Qt Quick 2
Change-Id: I9fafe7471567ed9cffae9e86a6c7e15069b683cb Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
# Add more folders to ship with the application, here
|
||||
folder_01.source = qml/Transitions
|
||||
folder_01.target = qml
|
||||
DEPLOYMENTFOLDERS = folder_01
|
||||
|
||||
# Additional import path used to resolve QML modules in Creator's code model
|
||||
QML_IMPORT_PATH =
|
||||
|
||||
# If your application uses the Qt Mobility libraries, uncomment the following
|
||||
# lines and add the respective components to the MOBILITY variable.
|
||||
# CONFIG += mobility
|
||||
# MOBILITY +=
|
||||
|
||||
# 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()
|
||||
@@ -1,14 +0,0 @@
|
||||
#include <QApplication>
|
||||
#include "qmlapplicationviewer.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QmlApplicationViewer viewer;
|
||||
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
|
||||
viewer.setMainQmlFile(QLatin1String("qml/Transitions/main.qml"));
|
||||
viewer.showExpanded();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
//! [0]
|
||||
|
||||
import QtQuick 1.1
|
||||
import QtQuick 2.0
|
||||
|
||||
Rectangle {
|
||||
id: page
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@@ -38,9 +38,9 @@
|
||||
|
||||
\list
|
||||
|
||||
\li \l{Creating a Qt Quick 1 Application}
|
||||
\li \l{Creating a Qt Quick Application}
|
||||
|
||||
Learn how to use \QMLD to create a Qt Quick 1 application.
|
||||
Learn how to use \QMLD to create a Qt Quick application.
|
||||
|
||||
\li \l{Creating a Qt Widget Based Application}
|
||||
|
||||
|
||||
@@ -125,9 +125,9 @@
|
||||
Use Qt Quick Components for MeeGo Harmattan to design a user
|
||||
interface with the platform look and feel
|
||||
|
||||
\li Qt Quick 1 Application (from Existing QML File)
|
||||
\li Qt Quick Application (from Existing QML File)
|
||||
|
||||
Convert existing Qt Quick 1 applications to projects that you
|
||||
Convert existing Qt Quick applications to projects that you
|
||||
can run in \QC or deploy to mobile devices
|
||||
|
||||
\li Qt Console Application
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
\li \l{Building and Running an Example}
|
||||
\li \l{Tutorials}
|
||||
\list
|
||||
\li \l{Creating a Qt Quick 1 Application}
|
||||
\li \l{Creating a Qt Quick Application}
|
||||
\li \l{Creating a Qt Widget Based Application}
|
||||
\endlist
|
||||
\endlist
|
||||
|
||||
@@ -28,19 +28,15 @@
|
||||
\page creator-qml-application.html
|
||||
\nextpage creator-writing-program.html
|
||||
|
||||
\title Creating a Qt Quick 1 Application
|
||||
|
||||
\note We recommend that you use Qt Quick 2 to develop new applications for
|
||||
platforms that run Qt 5.
|
||||
\title Creating a Qt Quick Application
|
||||
|
||||
This tutorial uses built-in QML elements and illustrates basic concepts of
|
||||
\l {http://qt-project.org/doc/qt-4.8/qtquick.html}{Qt Quick 1}.
|
||||
\l {http://qt-project.org/doc/qt-5.0/qtquick/qtquick-index.html}{Qt Quick}.
|
||||
|
||||
This tutorial describes how to use the \QC to implement the
|
||||
\l{http://qt-project.org/doc/qt-4.8/declarative-animation-states.html}
|
||||
{states and transitions example application}. The example application
|
||||
displays a Qt logo that moves between three rectangles on the page when you
|
||||
click them.
|
||||
This tutorial describes how to use \QC to implement Qt states and transitions. We use
|
||||
\l{http://qt-project.org/doc/qt-5.0/qtquick/quick-animation.html}{Qt example code} to
|
||||
create an application that displays a Qt logo that moves between three rectangles on the
|
||||
page when you click them.
|
||||
|
||||
\image qmldesigner-tutorial.png "States and transitions example"
|
||||
|
||||
@@ -52,7 +48,11 @@
|
||||
\list 1
|
||||
|
||||
\li Select \gui{File > New File or Project > Applications >
|
||||
Qt Quick 1 Application (Built-in Elements) > Choose}.
|
||||
Qt Quick 2 Application (Built-in Elements) > Choose}.
|
||||
|
||||
\note The QML types used in this example are also supported in Qt Quick 1. To create
|
||||
this example application for platforms that run Qt 4, select \gui {Qt Quick 1
|
||||
Application (Built-in Elements)}.
|
||||
|
||||
\li In the \gui{Name} field, type \b {Transitions}.
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
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:\QtSDK\Examples\4.7\declarative\animation\states}. The image appears
|
||||
\c {C:\Qt\Qt5.0.1\5.0.1\msvc2010\examples\declarative\animation\states}. The image appears
|
||||
in the \gui Resources pane. You can also use any other image or a QML
|
||||
element, instead.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user