qtquick-creating.qdoc 5.21 KB
Newer Older
1 2
/****************************************************************************
**
3
** Copyright (c) 2014 Digia Plc and/or its subsidiary(-ies).
hjk's avatar
hjk committed
4
** Contact: http://www.qt-project.org/legal
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
**
**
** GNU Free Documentation License
**
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of this
** file.
**
**
****************************************************************************/

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!

27
    \contentspage {Qt Creator Manual}
28 29 30 31 32 33 34 35 36 37 38 39 40
    \previouspage creator-visual-editor.html
    \page quick-projects.html
    \nextpage creator-using-qt-quick-designer.html

    \title Creating Qt Quick Projects

    \image qmldesigner-new-project.png "New File or Project dialog"

    When you create a new Qt Quick project from scratch, you have the following
    options:

    \list

41
        \li \gui {Qt Quick Application} creates a Qt Quick application project
42
            that can contain both QML and C++ code. The project includes a
43 44
            QDeclarativeView or QQuickView. You can build the application and
            deploy it to
45 46
            desktop and mobile target platforms.

47
        \li \gui {Qt Quick UI} creates a Qt Quick UI project with a single QML
48
            file that contains the main view. You can review Qt Quick UI
49 50
            projects in a \l{Previewing QML Files}{preview tool} and you need
            not build them. You do not
51
            need to have the development environment installed on your
52
            computer to create and run this type of project.
53

54
        \li \gui {Qt Quick Extension Plugins} (in the \gui Libraries category)
55 56 57 58 59
            create C++ plugins that make it possible to offer extensions that
            can be loaded dynamically into Qt Quick applications. Select
            \gui {Qt Quick 1 Extension Plugin} to create extensions for
            Qt Quick 1 applications and \gui {Qt Quick 2 Extension Plugin} to
            create extensions for Qt Quick 2 applications.
60 61 62 63 64

    \endlist

    \section1 Creating Qt Quick UI Projects

65 66 67 68 69 70
    \list 1

        \li Select \gui File > \gui {New File or Project} > \gui Applications >
            \gui {Qt Quick UI} > \gui Choose.

        \li In the \gui {Qt Quick component set} field, select the component set
71 72 73 74
            to use for the project. The Qt Quick imports enable you to use the
            basic QML types to create user interfaces, whereas the Qt Quick
            Controls provide a set of ready-made controls that you can customize
            by using Qt Quick Controls Styles:
75 76 77

        \list

78 79
            \li Select \gui {Qt Quick Controls} or \gui {Qt Quick 2.1}, or
                later, to develop for platforms that run Qt 5.
80 81 82 83 84 85 86 87

            \li Select \gui {Qt Quick 1.1} to develop for platforms that run
                Qt 4.7.4. To develop for platforms that run Qt 4.7.1, 4.7.2, or
                4.7.3, you must change the import statement to import Qt Quick
                1.0.

        \endlist

88 89 90 91
        You can add imports later to combine Qt Quick basic types with Qt Quick
        Controls, Qt Quick Dialogs, and Qt Quick Layouts (available since
        Qt 5.1).

92
    \endlist
93 94 95 96 97

    \QC creates the following files:

    \list

98
        \li .qmlproject project file defines that all QML, JavaScript, and image
99 100 101
            files in the project folder belong to the project. Therefore, you do
            not need to individually list all the files in the project.

102
        \li .qml file defines an UI item, such as a component, screen, or the
103 104 105 106 107 108 109 110 111
            whole application UI.

    \endlist

    To use JavaScript and image files in the application, copy them to the
    project folder.

    \section1 Creating Qt Quick Applications

112 113 114 115 116 117
    \list 1

        \li Select \gui File > \gui {New File or Project} > \gui Applications >
            \gui {Qt Quick Application} > \gui Choose.

        \li In the \gui {Qt Quick component set} field, select the component set
118 119
            to use for the project. For more information, see
            \l{Creating Qt Quick UI Projects}.
120 121 122 123 124 125 126 127

        \li Select \l{glossary-buildandrun-kit}{kits} for running and building
            your project, and then click \gui{Next}.

            \note Kits are listed if they have been specified in \gui Tools >
            \gui Options > \gui {Build & Run} > \gui Kits.

        \li Review the project settings, and click \gui{Finish} (on Windows and
128
            Linux) or \gui Done (on OS X) to create the project.
129 130

    \endlist
131

132
    \note The SDK for a particular target platform might install additional
133 134
    templates for that platform. For example, the BlackBerry 10 and QNX templates are installed
    as part of the BlackBerry 10 NDK, BlackBerry NDK, or QNX SDK.
135 136

    \QC creates the necessary boilerplate files. Some of the files are
137
    specific to a particular target platform.
138 139

*/