load(qt_build_config)
+CONFIG += qt_example_installs
+++ /dev/null
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/calqlatr
-qml.files = calqlatr.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/calqlatr
-sources.files = $$SOURCES calqlatr.pro
-sources.path = $$qml.path
-INSTALLS += target sources qml
+++ /dev/null
-TEMPLATE = subdirs
-SUBDIRS = calqlatr \
- samegame \
- tweetsearch \
- maroon \
- stocqt
-
-# install
-sources.files = demos.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos
-INSTALLS += sources
+++ /dev/null
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/maroon
-qml.files = maroon.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/maroon
-sources.files = $$SOURCES maroon.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/samegame
-qml.files = samegame.qml content settings.js
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/samegame
-sources.files = $$SOURCES samegame.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += qml quick
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/stocqt
-qml.files = stocqt.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/stocqt
-sources.files = $$SOURCES stocqt.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/tweetsearch
-qml.files = tweetsearch.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/demos/tweetsearch
-sources.files = $$SOURCES tweetsearch.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
TEMPLATE = subdirs
SUBDIRS += \
- demos \
- shared \
- localstorage \
- particles \
+ qmltest \
qml \
- quick \
- tutorials \
- window \
- qmltest
-
-# install
-sources.files = shared examples.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/
-INSTALLS += sources
+ quick
+++ /dev/null
-TEMPLATE = subdirs
-SUBDIRS += localstorage
-
-# install
-sources.files = localstorage.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/localstorage
-INSTALLS += sources
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/localstorage/localstorage
-qml.files = localstorage.qml hello.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/localstorage/localstorage
-sources.files = $$SOURCES localstorage.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/affectors
-qml.files = affectors.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/affectors
-sources.files = $$SOURCES affectors.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/customparticle
-qml.files = customparticle.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/customparticle
-sources.files = $$SOURCES customparticle.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/emitters
-qml.files = emitters.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/emitters
-sources.files = $$SOURCES emitters.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/imageparticle
-qml.files = imageparticle.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/imageparticle
-sources.files = $$SOURCES imageparticle.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+++ /dev/null
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/system
-qml.files = system.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles/system
-sources.files = $$SOURCES system.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
SOURCES += imageprovider.cpp
-OTHER_FILES += imageprovider.json
+EXAMPLE_FILES = imageprovider-example.qml
-sources.files = $$SOURCES imageprovider.qml imageprovider.pro $$OTHER_FILES
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/imageprovider
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/imageprovider/ImageProviderCore
-
-ImageProviderCore_sources.files = \
- ImageProviderCore/qmldir
-ImageProviderCore_sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/imageprovider/ImageProviderCore
-
-INSTALLS = sources ImageProviderCore_sources target
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/imageprovider/ImageProviderCore
+qml.files = ImageProviderCore/qmldir
+qml.path = $$[QT_INSTALL_EXAMPLES]/qml/imageprovider/ImageProviderCore
+INSTALLS = target qml
SOURCES += main.cpp
RESOURCES += networkaccessmanagerfactory.qrc
-sources.files = $$SOURCES $$RESOURCES networkaccessmanagerfactory.pro view.qml
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/networkaccessmanagerfactory
-target.path = $$sources.path
-
-INSTALLS = sources target
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/networkaccessmanagerfactory
+INSTALLS = target
SOURCES += plugin.cpp
-qdeclarativesources.files += \
+pluginfiles.files += \
imports/TimeExample/qmldir \
imports/TimeExample/center.png \
imports/TimeExample/clock.png \
imports/TimeExample/hour.png \
imports/TimeExample/minute.png
-qdeclarativesources.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/plugins/imports/TimeExample
+qml.files = plugins.qml
+qml.path += $$[QT_INSTALL_EXAMPLES]/qml/plugins
+target.path += $$[QT_INSTALL_EXAMPLES]/qml/plugins/imports/TimeExample
+pluginfiles.path += $$[QT_INSTALL_EXAMPLES]/qml/plugins/imports/TimeExample
-sources.files += plugins.pro plugin.cpp plugins.qml
-sources.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/plugins
-target.path += $$[QT_INSTALL_EXAMPLES]/qtquick/qml/plugins/imports/TimeExample
-
-INSTALLS += qdeclarativesources sources target
+INSTALLS += target qml pluginfiles
TEMPLATE = subdirs
SUBDIRS +=imageprovider \
- plugins \
networkaccessmanagerfactory \
+ plugins \
referenceexamples \
- shell
+ shell \
+ xmlhttprequest
-#Install
-sources.files = qml.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml
-INSTALLS += sources
+EXAMPLE_FILES = \
+ dynamicscene \
+ i18n \
+ locale
HEADERS += person.h
RESOURCES += adding.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/adding
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS adding.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/adding
+INSTALLS += target
birthdayparty.h
RESOURCES += attached.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/attached
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS attached.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/attached
+INSTALLS += target
HEADERS += person.h \
birthdayparty.h \
happybirthdaysong.h
-
RESOURCES += binding.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/binding
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS binding.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/binding
+INSTALLS += target
birthdayparty.h
RESOURCES += coercion.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/coercion
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS coercion.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/coercion
+INSTALLS += target
birthdayparty.h
RESOURCES += default.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/default
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS default.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/default
+INSTALLS += target
HEADERS += lineedit.h
RESOURCES += extended.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/extended
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS extended.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/extended
+INSTALLS += target
birthdayparty.h
RESOURCES += grouped.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/grouped
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS grouped.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/grouped
+INSTALLS += target
birthdayparty.h
RESOURCES += methods.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/methods
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS methods.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/methods
+INSTALLS += target
birthdayparty.h
RESOURCES += properties.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/properties
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS properties.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/properties
+INSTALLS += target
methods
!contains(QT_CONFIG, no-widgets): SUBDIRS += extended
-
-sources.files = referenceexamples.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples
-INSTALLS += sources
birthdayparty.h
RESOURCES += signal.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/signal
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS signal.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/signal
+INSTALLS += target
happybirthdaysong.h
RESOURCES += valuesource.qrc
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/referenceexamples/valuesource
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS valuesource.pro example.qml
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/referenceexamples/valuesource
+INSTALLS += target
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/shell
-sources.files = $$SOURCES shell.pro
-sources.path = $$target.path
-INSTALLS += target sources
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/shell
+INSTALLS += target
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(xmlhttprequest)
\ No newline at end of file
+#include "../../quick/shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(xmlhttprequest)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/xmlhttprequest
+EXAMPLE_FILES = \
+ data.xml
+
+target.path = $$[QT_INSTALL_EXAMPLES]/qml/xmlhttprequest
qml.files = xmlhttprequest.qml get.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qml/xmlhttprequest
+qml.path = $$[QT_INSTALL_EXAMPLES]/qml/xmlhttprequest
INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../../quick/shared" as Examples
Item {
height: 480
# Note: Normally, tests are auto-installed to a test-specific directory. Overwritten here
# so this one will end up in the examples tree.
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/qmltest
-sources.files = $$SOURCES qmltest.pro *.qml
-sources.path = $$target.path
-INSTALLS = sources target
+target.path = $$[QT_INSTALL_EXAMPLES]/qmltest
+qml.files = tst_basic.qml tst_item.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/qmltest
+INSTALLS += target qml
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/accessibility
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/accessibility
qml.files = accessibility.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/accessibility
-sources.files = $$SOURCES accessibility.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/accessibility
+INSTALLS += target qml
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(accessibility)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/animation
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/animation
qml.files = animation.qml basics behaviors easing pathanimation pathinterpolator states
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/animation
-sources.files = $$SOURCES animation.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/animation
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(animation)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/canvas
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/canvas
qml.files = canvas.qml bezierCurve clip quadraticCurveTo roundedrect smile squircle tiger contents
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/canvas
-sources.files = $$SOURCES canvas.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/canvas
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(canvas)
\ No newline at end of file
TEMPLATE = subdirs
SUBDIRS = \
- #dialcontrol \
- #flipable \
painteditem \
- #progressbar \
- #scrollbar \
- #searchbox \
- #slideswitch \
- #spinner \
- #tabwidget \
maskedmousearea
-# install
-sources.files = customitems.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/customitems
-INSTALLS += sources
+EXAMPLE_FILES = \
+ dialcontrol \
+ flipable \
+ progressbar \
+ scrollbar \
+ searchbox \
+ slideswitch \
+ spinner \
+ tabwidget
SOURCES += main.cpp \
maskedmousearea.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/customitems/maskedmousearea
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/maskedmousearea
qml.files = maskedmousearea.qml images
qml.path = $$target.path
-sources.files = $$SOURCES $$HEADERS maskedmousearea.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+INSTALLS += target qml
SOURCES += textballoon.cpp
-OTHER_FILES += textballoon.json
-
DESTDIR = TextBalloonPlugin
-INSTALL_PATH = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/customitems/painteditem/
-qdeclarativesources.files += \
- TextBalloonPlugin/qmldir TextBalloonPlugin/plugin.h
-qdeclarativesources.path += $$INSTALL_PATH/TextBalloonPlugin
-sources.files = textballoons.qml $$SOURCES textballoon.h $$OTHER_FILES painteditem.pro
-sources.path = $$INSTALL_PATH
-target.path = $$INSTALL_PATH/TextBalloonPlugin
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/TextBalloonPlugin
+qmldir.files = TextBalloonPlugin/qmldir
+qmldir.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/TextBalloonPlugin
+qml.files = textballoons.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/
-INSTALLS = qdeclarativesources sources target
+INSTALLS += qml qmldir target
--- /dev/null
+TEMPLATE = app
+
+QT += qml quick
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/calqlatr
+qml.files = calqlatr.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/calqlatr
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS = samegame \
+ calqlatr \
+ tweetsearch \
+ maroon \
+ stocqt
+
+EXAMPLE_FILES = \
+ clocks \
+ photoviewer \
+ rssnews
--- /dev/null
+TEMPLATE = app
+
+QT += qml quick
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/maroon
+qml.files = maroon.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/maroon
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += qml quick
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/samegame
+qml.files = samegame.qml content settings.js
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/samegame
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += qml quick
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/stocqt
+qml.files = stocqt.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/stocqt
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/tweetsearch
+qml.files = tweetsearch.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/demos/tweetsearch
+INSTALLS += target qml
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/draganddrop
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/draganddrop
qml.files = draganddrop.qml tiles views
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/draganddrop
-sources.files = $$SOURCES draganddrop.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/draganddrop
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(draganddrop)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/imageelements
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/imageelements
qml.files = *.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/imageelements
-sources.files = $$SOURCES imageelements.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/imageelements
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared"
+import "../shared"
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(imageelements)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/keyinteraction
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/keyinteraction
qml.files = keyinteraction.qml focus
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/keyinteraction
-sources.files = $$SOURCES keyinteraction.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/keyinteraction
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Loader {//Just loader, since there's only one.
source: "focus/focus.qml"
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(keyinteraction)
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS += localstorage
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/localstorage/localstorage
+qml.files = localstorage.qml hello.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/localstorage/localstorage
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+TARGET = modelviews
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/modelviews
+qml.files = \
+ modelviews.qml \
+ gridview \
+ listview \
+ package \
+ parallax \
+ pathview \
+ visualdatamodel \
+ visualitemmodel
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/modelviews
+INSTALLS += target qml
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(modelviews)
-TEMPLATE = app
+TEMPLATE = subdirs
-QT += quick qml
-SOURCES += main.cpp
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/modelviews
-qml.files = \
- modelviews.qml \
- gridview \
- listview \
- package \
- parallax \
- pathview \
- visualdatamodel \
- visualitemmodel
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/modelviews
-sources.files = $$SOURCES modelviews.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+browser.file = browser.prx
+SUBDIRS = \
+ browser \
+# abstractitemmodel \ # Does not build
+ objectlistmodel \
+ stringlistmodel
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(mousearea)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/mousearea
+EXAMPLE_FILES = \
+ mousearea-wheel-example.qml
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/mousearea
qml.files = mousearea.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/mousearea
-sources.files = $$SOURCES mousearea.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/mousearea
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/affectors
+qml.files = affectors.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/affectors
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/customparticle
+qml.files = customparticle.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/customparticle
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/emitters
+qml.files = emitters.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/emitters
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/imageparticle
+qml.files = imageparticle.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/imageparticle
+INSTALLS += target qml
imageparticle \
system
+EXAMPLE_FILES = \
+ itemparticle
+
#Install shared images too
qml.files = images
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/particles
-sources.files = particles.pro
-sources.path = $$qml.path
-INSTALLS = sources qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles
+INSTALLS += qml
--- /dev/null
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/system
+qml.files = system.qml content
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/particles/system
+INSTALLS += target qml
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(positioners)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/positioners
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/positioners
qml.files = positioners.qml positioners-transitions.qml positioners-attachedproperties.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/positioners
-sources.files = $$SOURCES positioners.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/positioners
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
canvas \
imageelements \
keyinteraction \
+ localstorage \
modelviews \
mousearea \
positioners \
text \
threading \
touchinteraction \
- customitems
+ tutorials \
+ customitems \
+ window \
+ particles \
+ demos
-# install
-sources.files = quick.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick
-INSTALLS += sources
+EXAMPLE_FILES = \
+ ui-components \
+ shared
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(righttoleft)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/righttoleft
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/righttoleft
qml.files = righttoleft.qml layoutdirection layoutmirroring textalignment
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/righttoleft
-sources.files = $$SOURCES righttoleft.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/righttoleft
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
HEADERS += \
beziercurve.h
-OTHER_FILES += main.qml
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/customgeometry
+qml.files = main.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/customgeometry
-sources.files = $$SOURCES $$HEADERS $$OTHER_FILES customgeometry.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/scenegraph/customgeometry
-target.path = $$sources.path
-INSTALLS += sources target
+INSTALLS += target qml
HEADERS += squircle.h
SOURCES += squircle.cpp main.cpp
-OTHER_FILES += main.qml
-
-sources.files = $$SOURCES $$HEADERS $$OTHER_FILES openglunderqml.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/scenegraph/openglunderqml
-target.path = $$sources.path
-INSTALLS += sources target
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/openglunderqml
+qml.files = main.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/openglunderqml
+INSTALLS += target qml
TEMPLATE = subdirs
SUBDIRS += customgeometry simplematerial openglunderqml
-
-# install
-sources.files = scenegraph.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/scenegraph
-INSTALLS += sources
SOURCES += \
simplematerial.cpp
-OTHER_FILES += \
- main.qml
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/simplematerial
+qml.files = main.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/scenegraph/simplematerial
-sources.files = $$SOURCES $$OTHER_FILES simplematerial.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/scenegraph/simplematerial
-target.path = $$sources.path
-INSTALLS += sources target
+INSTALLS += target qml
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(shadereffects)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/shadereffects
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/shadereffects
qml.files = shadereffects.qml content
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/shadereffects
-sources.files = $$SOURCES shadereffects.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/shadereffects
+INSTALLS += target qml
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(text)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/text
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/text
qml.files = fonts imgtag styledtext-layout.qml text.qml textselection
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/text
-sources.files = $$SOURCES text.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/text
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared"
+import "../shared"
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(threading)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/threading
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/threading
qml.files = threading.qml threadedlistmodel workerscript
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/threading
-sources.files = $$SOURCES threading.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/threading
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared" as Examples
+import "../shared" as Examples
Item {
height: 480
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../../shared/shared.h"
+#include "../shared/shared.h"
DECLARATIVE_EXAMPLE_MAIN(touchinteraction)
QT += quick qml
SOURCES += main.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/touchinteraction
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/touchinteraction
qml.files = flickable multipointtouch pincharea touchinteraction.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/quick/touchinteraction
-sources.files = $$SOURCES touchinteraction.pro
-sources.path = $$qml.path
-INSTALLS += sources target qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/touchinteraction
+INSTALLS += target qml
****************************************************************************/
import QtQuick 2.0
-import "../../shared"
+import "../shared"
Item {
height: 480
file.cpp \
dialogPlugin.cpp
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/tutorials/gettingStartedQml/filedialog
-sources.files = $$SOURCES $$HEADERS filedialog.pro
-sources.path = $$target.path
-INSTALLS = sources target
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/tutorials/gettingStartedQml/filedialog
+qml.files = qmldir
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/tutorials/gettingStartedQml/filedialog
+INSTALLS += target qml
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS = \
+ filedialog\
+
+EXAMPLE_FILES = \
+ core \
+ images \
+ parts \
+ pics \
+ texteditor.qml
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS += gettingStartedQml
+
+EXAMPLE_FILES = \
+ dynamicview \
+ extending \
+ helloworld \
+ samegame
This example shows how to create a reusable switch component in QML.
-The code for this example can be found in the \c examples/tutorials/ui-components/slideswitch directory.
+The code for this example can be found in the \c examples/quick/tutorials/ui-components/slideswitch directory.
The elements that compose the switch are:
--- /dev/null
+TEMPLATE = subdirs
+SUBDIRS += \
+ window
+
+EXAMPLE_FILES = \
+ screen
--- /dev/null
+TEMPLATE = app
+CONFIG += qt
+QT += qml
+
+SOURCES += window.cpp
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/window/window
+qml.files = Window.qml nogui.qml standalone.qml twowindows.qml
+qml.path = $$[QT_INSTALL_EXAMPLES]/quick/window/window
+
+INSTALLS = target qml
+++ /dev/null
-#just install the files, all QML for now
-TEMPLATE = aux
-
-qml.files = images \
- LauncherList.qml \
- SimpleLauncherDelegate.qml \
- Button.qml
-qml.path = $$[QT_INSTALL_EXAMPLES]/qtquick/shared
-INSTALLS = qml
+++ /dev/null
-TEMPLATE = subdirs
-SUBDIRS = \
- filedialog\
-
-# install
-sources.files = gettingStartedQml.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/tutorials/gettingStartedQml
-INSTALLS += sources
+++ /dev/null
-TEMPLATE = subdirs
-SUBDIRS += gettingStartedQml
-
-# install
-sources.files = tutorials.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/tutorials
-INSTALLS += sources
+++ /dev/null
-TEMPLATE = subdirs
-SUBDIRS += \
- #screen \
- window
-
-# install
-sources.files = window.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/qtquick/window
-INSTALLS += sources
+++ /dev/null
-TEMPLATE = app
-CONFIG += qt
-QT += qml
-
-SOURCES += window.cpp
-OTHER_FILES = Window.qml nogui.qml standalone.qml twowindows.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/qtquick/window/window
-sources.files = $$SOURCES $$OTHER_FILES window.pro
-sources.path = $$target.path
-INSTALLS = sources target
Tutorial chapters:
\list 1
-\li \l{examples/tutorials/extending/chapter1-basics}{Creating a New Type}
-\li \l{examples/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
-\li \l{examples/tutorials/extending/chapter3-bindings}{Property Binding}
-\li \l{examples/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
-\li \l{examples/tutorials/extending/chapter5-listproperties}{Using List Property Types}
-\li \l{examples/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
+\li \l{examples/quick/tutorials/extending/chapter1-basics}{Creating a New Type}
+\li \l{examples/quick/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
+\li \l{examples/quick/tutorials/extending/chapter3-bindings}{Property Binding}
+\li \l{examples/quick/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
+\li \l{examples/quick/tutorials/extending/chapter5-listproperties}{Using List Property Types}
+\li \l{examples/quick/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
\li \l{qml-extending-tutorial7.html}{In Summary}
\endlist
/*!
\title Chapter 1: Creating a New Type
-\example examples/tutorials/extending/chapter1-basics
+\example examples/quick/tutorials/extending/chapter1-basics
A common task when extending QML is to provide a new QML type that supports some
custom functionality beyond what is provided by the built-in \l {Qt Quick QML Types}{QtQuick types}.
Here is our \c PieChart class, defined in \c piechart.h:
-\snippet examples/tutorials/extending/chapter1-basics/piechart.h 0
+\snippet examples/quick/tutorials/extending/chapter1-basics/piechart.h 0
The class inherits from QQuickPaintedItem because we want to override
QQuickPaintedItem::paint() in perform drawing operations with the QPainter API.
implements \c paint() to draw a simple pie chart. It also turns off the
QGraphicsItem::ItemHasNoContents flag to enable painting:
-\snippet examples/tutorials/extending/chapter1-basics/piechart.cpp 0
+\snippet examples/quick/tutorials/extending/chapter1-basics/piechart.cpp 0
\dots 0
-\snippet examples/tutorials/extending/chapter1-basics/piechart.cpp 1
+\snippet examples/quick/tutorials/extending/chapter1-basics/piechart.cpp 1
Now that we have defined the \c PieChart type, we will use it from QML. The \c app.qml
file creates a \c PieChart item and display the pie chart's details
using a standard QML \l Text item:
-\snippet examples/tutorials/extending/chapter1-basics/app.qml 0
+\snippet examples/quick/tutorials/extending/chapter1-basics/app.qml 0
Notice that although the color is specified as a string in QML, it is automatically
converted to a QColor object for the PieChart \c color property. Automatic conversions are
Here is the application \c main.cpp:
-\snippet examples/tutorials/extending/chapter1-basics/main.cpp 0
+\snippet examples/quick/tutorials/extending/chapter1-basics/main.cpp 0
This call to qmlRegisterType() registers the \c PieChart type as a type called "PieChart",
in a type namespace called "Charts", with a version of 1.0.
Lastly, we write a \c .pro project file that includes the files and the \c declarative library:
-\quotefile examples/tutorials/extending/chapter1-basics/chapter1-basics.pro
+\quotefile examples/quick/tutorials/extending/chapter1-basics/chapter1-basics.pro
Now we can build and run the application:
\image extending-tutorial-chapter1.png
-Try it yourself with the code in Qt's \c examples/tutorials/extending/chapter1-basics directory.
+Try it yourself with the code in Qt's \c examples/quick/tutorials/extending/chapter1-basics directory.
*/
/*!
\title Chapter 2: Connecting to C++ Methods and Signals
-\example examples/tutorials/extending/chapter2-methods
+\example examples/quick/tutorials/extending/chapter2-methods
Suppose we want \c PieChart to have a "clearChart()" method that erases the
chart and then emits a "chartCleared" signal. Our \c app.qml would be able
to call \c clearChart() and receive \c chartCleared() signals like this:
-\snippet examples/tutorials/extending/chapter2-methods/app.qml 0
+\snippet examples/quick/tutorials/extending/chapter2-methods/app.qml 0
\image extending-tutorial-chapter2.png
To do this, we add a \c clearChart() method and a \c chartCleared() signal
to our C++ class:
-\snippet examples/tutorials/extending/chapter2-methods/piechart.h 0
+\snippet examples/quick/tutorials/extending/chapter2-methods/piechart.h 0
\dots
-\snippet examples/tutorials/extending/chapter2-methods/piechart.h 1
+\snippet examples/quick/tutorials/extending/chapter2-methods/piechart.h 1
\dots
-\snippet examples/tutorials/extending/chapter2-methods/piechart.h 2
+\snippet examples/quick/tutorials/extending/chapter2-methods/piechart.h 2
\dots
-\snippet examples/tutorials/extending/chapter2-methods/piechart.h 3
+\snippet examples/quick/tutorials/extending/chapter2-methods/piechart.h 3
The use of Q_INVOKABLE makes the \c clearChart() method available to the
Qt Meta-Object system, and in turn, to QML. Note that it could have
The \c clearChart() method simply changes the color to Qt::transparent,
repaints the chart, then emits the \c chartCleared() signal:
-\snippet examples/tutorials/extending/chapter2-methods/piechart.cpp 0
+\snippet examples/quick/tutorials/extending/chapter2-methods/piechart.cpp 0
Now when we run the application and click the window, the pie chart
disappears, and the application outputs:
The chart has been cleared
\endcode
-Try out the example yourself with the updated code in Qt's \c examples/tutorials/extending/chapter2-methods directory.
+Try out the example yourself with the updated code in Qt's \c examples/quick/tutorials/extending/chapter2-methods directory.
*/
/*!
\title Chapter 3: Adding Property Bindings
-\example examples/tutorials/extending/chapter3-bindings
+\example examples/quick/tutorials/extending/chapter3-bindings
Property binding is a powerful feature of QML that allows values of different
elements to be synchronized automatically. It uses signals to notify and update
Let's enable property bindings for the \c color property. That means
if we have code like this:
-\snippet examples/tutorials/extending/chapter3-bindings/app.qml 0
+\snippet examples/quick/tutorials/extending/chapter3-bindings/app.qml 0
\image extending-tutorial-chapter3.png
We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "colorChanged" signal
is emitted whenever the value changes.
-\snippet examples/tutorials/extending/chapter3-bindings/piechart.h 0
+\snippet examples/quick/tutorials/extending/chapter3-bindings/piechart.h 0
\dots
-\snippet examples/tutorials/extending/chapter3-bindings/piechart.h 1
+\snippet examples/quick/tutorials/extending/chapter3-bindings/piechart.h 1
\dots
-\snippet examples/tutorials/extending/chapter3-bindings/piechart.h 2
+\snippet examples/quick/tutorials/extending/chapter3-bindings/piechart.h 2
\dots
-\snippet examples/tutorials/extending/chapter3-bindings/piechart.h 3
+\snippet examples/quick/tutorials/extending/chapter3-bindings/piechart.h 3
Then, we emit this signal in \c setPieSlice():
-\snippet examples/tutorials/extending/chapter3-bindings/piechart.cpp 0
+\snippet examples/quick/tutorials/extending/chapter3-bindings/piechart.cpp 0
It's important for \c setColor() to check that the color value has actually changed
before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and
/*!
\title Chapter 4: Using Custom Property Types
-\example examples/tutorials/extending/chapter4-customPropertyTypes
+\example examples/quick/tutorials/extending/chapter4-customPropertyTypes
The \c PieChart type currently has a string-type property and a color-type property.
It could have many other types of properties. For example, it could have an
"PieSlice" that has a \c color property. Instead of assigning a color,
we assign an \c PieSlice value which itself contains a \c color:
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/app.qml 0
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/app.qml 0
Like \c PieChart, this new \c PieSlice type inherits from QQuickPaintedItem and declares
its properties with Q_PROPERTY():
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/pieslice.h 0
To use it in \c PieChart, we modify the \c color property declaration
and associated method signatures:
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/piechart.h 0
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 0
\dots
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/piechart.h 1
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 1
\dots
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/piechart.h 2
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 2
\dots
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/piechart.h 3
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.h 3
There is one thing to be aware of when implementing \c setPieSlice(). The \c PieSlice
is a visual item, so it must be set as a child of the \c PieChart using
QQuickItem::setParentItem() so that the \c PieChart knows to paint this child
item when its contents are drawn:
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp 0
Like the \c PieChart type, the \c PieSlice type has to be registered
using qmlRegisterType() to be used from QML. As with \c PieChart, we'll add the
type to the "Charts" type namespace, version 1.0:
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/main.cpp 0
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp 0
\dots
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/main.cpp 1
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp 1
\dots
-\snippet examples/tutorials/extending/chapter4-customPropertyTypes/main.cpp 2
+\snippet examples/quick/tutorials/extending/chapter4-customPropertyTypes/main.cpp 2
-Try it out with the code in Qt's \c examples/tutorials/extending/chapter4-customPropertyTypes directory.
+Try it out with the code in Qt's \c examples/quick/tutorials/extending/chapter4-customPropertyTypes directory.
*/
/*!
\title Chapter 5: Using List Property Types
-\example examples/tutorials/extending/chapter5-listproperties
+\example examples/quick/tutorials/extending/chapter5-listproperties
Right now, a \c PieChart can only have one \c PieSlice. Ideally a chart would
have multiple slices, with different colors and sizes. To do this, we could
have a \c slices property that accepts a list of \c PieSlice items:
-\snippet examples/tutorials/extending/chapter5-listproperties/app.qml 0
+\snippet examples/quick/tutorials/extending/chapter5-listproperties/app.qml 0
\image extending-tutorial-chapter5.png
an internal \c append_slice() function (discussed below). We also use a QList to
store the internal list of slices as \c m_slices:
-\snippet examples/tutorials/extending/chapter5-listproperties/piechart.h 0
+\snippet examples/quick/tutorials/extending/chapter5-listproperties/piechart.h 0
\dots
-\snippet examples/tutorials/extending/chapter5-listproperties/piechart.h 1
+\snippet examples/quick/tutorials/extending/chapter5-listproperties/piechart.h 1
\dots
-\snippet examples/tutorials/extending/chapter5-listproperties/piechart.h 2
+\snippet examples/quick/tutorials/extending/chapter5-listproperties/piechart.h 2
Although the \c slices property does not have an associated \c WRITE function,
it is still modifiable because of the way QQmlListProperty works.
\c PieChart::append_slice() function is to be called whenever a request is made from QML
to add items to the list:
-\snippet examples/tutorials/extending/chapter5-listproperties/piechart.cpp 0
+\snippet examples/quick/tutorials/extending/chapter5-listproperties/piechart.cpp 0
The \c append_slice() function simply sets the parent item as before,
and adds the new item to the \c m_slices list. As you can see, the append function for a
properties and to draw the slice according to these values. This is a straightforward
modification if you have read the previous pages in this tutorial, so the code is not shown here.
-The complete code can be seen in the updated \c examples/tutorials/extending/chapter5-listproperties directory.
+The complete code can be seen in the updated \c examples/quick/tutorials/extending/chapter5-listproperties directory.
*/
/*!
\title Chapter 6: Writing an Extension Plugin
-\example examples/tutorials/extending/chapter6-plugins
+\example examples/quick/tutorials/extending/chapter6-plugins
Currently the \c PieChart and \c PieSlice types are used by \c app.qml,
which is displayed using a QQuickView in a C++ application. An alternative
Here is the \c ChartsPlugin definition in \c chartsplugin.h:
-\snippet examples/tutorials/extending/chapter6-plugins/chartsplugin.h 0
+\snippet examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.h 0
And its implementation in \c chartsplugin.cpp:
-\snippet examples/tutorials/extending/chapter6-plugins/chartsplugin.cpp 0
+\snippet examples/quick/tutorials/extending/chapter6-plugins/chartsplugin.cpp 0
Then, we write a \c .pro project file that defines the project as a plugin library
and specifies with DESTDIR that library files should be built into a "lib" subdirectory:
-\quotefile examples/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
+\quotefile examples/quick/tutorials/extending/chapter6-plugins/chapter6-plugins.pro
Finally, we add a \l{qtqml-modules-qmldir.html}{qmldir} file that is
parsed by the QML engine. In this file, we specify that a plugin named
"chapter6-plugin" (the name of the example project) can be found in the "lib" subdirectory:
-\quotefile examples/tutorials/extending/chapter6-plugins/Charts/qmldir
+\quotefile examples/quick/tutorials/extending/chapter6-plugins/Charts/qmldir
Now we have a plugin, and instead of having a main.cpp and an executable, we can build
the project and then load the QML file using the \l{Prototyping with qmlscene}{qmlscene tool},
\li \l {tutorials/samegame/samegame4}{Finishing Touches}
\endlist
-All the code in this tutorial can be found in Qt's \c examples/tutorials/samegame
+All the code in this tutorial can be found in Qt's \c examples/quick/tutorials/samegame
directory.
*/
\li \l {tutorials/dynamicview/dynamicview4}{Sorting Items}
\endlist
-All the code in this tutorial can be found in Qt's \c examples/tutorials/dynamicview
+All the code in this tutorial can be found in Qt's \c examples/quick/tutorials/dynamicview
directory.
*/
\previouspage QML Dynamic View Ordering Tutorial 2 - Dragging View Items
\nextpage QML Dynamic View Ordering Tutorial 4 - Sorting Items
-\example examples/tutorials/dynamicview/dynamicview3
+\example examples/quick/tutorials/dynamicview/dynamicview3
The next step in our application to move items within the list as they're dragged so that we
can re-order the list. To achieve this we introduce three new elements to our application;
Chapter one starts with a minimal "Hello world" program and the following chapters introduce new concepts.
-The tutorial's source code is located in the \c{examples/tutorials/helloworld} directory.
+The tutorial's source code is located in the \c{examples/quick/tutorials/helloworld} directory.
Tutorial chapters: