diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-04-05 23:30:16 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-04-05 23:30:16 +0300 |
commit | 9bb4a9bf55c0673f946a5c756043d33b7f239f7f (patch) | |
tree | d0ea5f9617180aee1b1d7db8de34ee1d0a6b5394 /doc/src/getting-started/gettingstartedqml.qdoc | |
parent | c0c7bf07dd2023beb52abe86b69603cb30943036 (diff) | |
parent | b1b725e6f2ba1cde2bff7e2ad8942b8dff8a1333 (diff) | |
download | qtdoc-9bb4a9bf55c0673f946a5c756043d33b7f239f7f.tar.gz |
Merge tag 'v5.15.9-lts-lgpl' into 5.155.15
Qt 5.15.9-lts-lgpl release
Diffstat (limited to 'doc/src/getting-started/gettingstartedqml.qdoc')
-rw-r--r-- | doc/src/getting-started/gettingstartedqml.qdoc | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index 1d033139..5ff64c35 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2018 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. @@ -31,7 +31,7 @@ \brief A tutorial for Qt Quick based on an alarms application. This tutorial shows how to develop a simple alarm application as - an introduction to Qt Quick and Qt Quick Controls2. + an introduction to Qt Quick and Qt Quick Controls. This application is similar to the alarm application usually found on an Android phone. Its features let you enter, edit, @@ -65,6 +65,9 @@ The latter two files are included with the source code for this tutorial. + \note The UI text in Qt Creator and the contents of the generated files + depend on the Qt Creator version that you use. + \section1 Qt Creator Setting up a new project in Qt Creator is aided by a wizard that @@ -73,12 +76,12 @@ type of project and creates the project for you. To create the Alarms project, select \uicontrol{File} > - \uicontrol{New File or Project} > \uicontrol{Application} > - \uicontrol{Qt Quick Application - Empty} > \uicontrol{Choose}. - Type "alarms" in the \b{Name} field, and follow the instructions + \uicontrol{New Project} > \uicontrol{Application (Qt)} > + \uicontrol{Qt Quick Application} > \uicontrol{Choose}. + Type \e alarms in the \uicontrol{Name} field, and follow the instructions of the wizard. - \image alarms2.png "Qt Creator New File or Project dialog" + \image alarms2.png "Qt Creator New Project dialog" \image alarms3.png "Project Location" @@ -90,15 +93,16 @@ \li Source file \li Purpose \row - \li alarms.pro + \li CMakeLists.txt \li The project file \row \li main.cpp \li The main C++ code file for the application. - \row - \li qml.qrc - \li The resource file, which contains the names of the - source files, except main.cpp and the project file. + \row + \li main.qml + \li The main QML code file for the application. We will instantiate + our custom QML types (\c AlarmDialog, \c AlarmModel, + \c AlarmDelegate, and \c TumblerDelegate) in this file. \endtable The wizard generates the code in the main.cpp file below. @@ -119,10 +123,6 @@ \li \c qtquickcontrols2.conf \li Selects the \c Material style with the \c Dark theme. \row - \li \c main.qml - \li The QML code that links AlarmDialog.qml, AlarmModel.qml, - AlarmDelegate.qml and TumblerDelegate.qml - \row \li \c AlarmDialog.qml \li Defines the dialog for adding new alarms. \row @@ -133,7 +133,11 @@ \li Defines the ListModel used for storing the alarms' data. \row \li \c TumblerDelegate.qml - \li Defines the graphical layout of the Tumblers + \li Defines the graphical layout of the Tumblers. + \row + \li \c qml.qrc + \li The resource file, which contains the names of the + source files, except main.cpp and the project file. \endtable |