aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/gallery
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/gallery')
-rw-r--r--examples/quickcontrols2/gallery/.prev_CMakeLists.txt103
-rw-r--r--examples/quickcontrols2/gallery/CMakeLists.txt10
-rw-r--r--examples/quickcontrols2/gallery/gallery.cpp6
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml14
-rw-r--r--examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ButtonPage.qml6
-rw-r--r--examples/quickcontrols2/gallery/pages/CheckBoxPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ComboBoxPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/DelayButtonPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/DelegatePage.qml6
-rw-r--r--examples/quickcontrols2/gallery/pages/DialPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/DialogPage.qml6
-rw-r--r--examples/quickcontrols2/gallery/pages/FramePage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/GroupBoxPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ProgressBarPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/RadioButtonPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/RangeSliderPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ScrollBarPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ScrollablePage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/SliderPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/SpinBoxPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/StackViewPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/SwipeViewPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/SwitchPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/TabBarPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/TextAreaPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/TextFieldPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/ToolTipPage.qml4
-rw-r--r--examples/quickcontrols2/gallery/pages/TumblerPage.qml4
31 files changed, 177 insertions, 70 deletions
diff --git a/examples/quickcontrols2/gallery/.prev_CMakeLists.txt b/examples/quickcontrols2/gallery/.prev_CMakeLists.txt
new file mode 100644
index 00000000..a175afa9
--- /dev/null
+++ b/examples/quickcontrols2/gallery/.prev_CMakeLists.txt
@@ -0,0 +1,103 @@
+# Generated from gallery.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(gallery LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quickcontrols2/gallery")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Quick)
+find_package(Qt6 COMPONENTS QuickControls2)
+
+add_qt_gui_executable(gallery
+ gallery.cpp
+)
+target_link_libraries(gallery PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Quick
+ Qt::QuickControls2
+)
+
+
+# Resources:
+set(qmake_immediate_resource_files
+ "gallery.qml"
+ "icons/gallery/20x20/back.png"
+ "icons/gallery/20x20/drawer.png"
+ "icons/gallery/20x20/menu.png"
+ "icons/gallery/20x20@2/back.png"
+ "icons/gallery/20x20@2/drawer.png"
+ "icons/gallery/20x20@2/menu.png"
+ "icons/gallery/20x20@3/back.png"
+ "icons/gallery/20x20@3/drawer.png"
+ "icons/gallery/20x20@3/menu.png"
+ "icons/gallery/20x20@4/back.png"
+ "icons/gallery/20x20@4/drawer.png"
+ "icons/gallery/20x20@4/menu.png"
+ "icons/gallery/index.theme"
+ "images/arrow.png"
+ "images/arrow@2x.png"
+ "images/arrow@3x.png"
+ "images/arrow@4x.png"
+ "images/arrows.png"
+ "images/arrows@2x.png"
+ "images/arrows@3x.png"
+ "images/arrows@4x.png"
+ "images/qt-logo.png"
+ "images/qt-logo@2x.png"
+ "images/qt-logo@3x.png"
+ "images/qt-logo@4x.png"
+ "pages/BusyIndicatorPage.qml"
+ "pages/ButtonPage.qml"
+ "pages/CheckBoxPage.qml"
+ "pages/ComboBoxPage.qml"
+ "pages/DelayButtonPage.qml"
+ "pages/DelegatePage.qml"
+ "pages/DialPage.qml"
+ "pages/DialogPage.qml"
+ "pages/FramePage.qml"
+ "pages/GroupBoxPage.qml"
+ "pages/PageIndicatorPage.qml"
+ "pages/ProgressBarPage.qml"
+ "pages/RadioButtonPage.qml"
+ "pages/RangeSliderPage.qml"
+ "pages/ScrollBarPage.qml"
+ "pages/ScrollIndicatorPage.qml"
+ "pages/ScrollablePage.qml"
+ "pages/SliderPage.qml"
+ "pages/SpinBoxPage.qml"
+ "pages/StackViewPage.qml"
+ "pages/SwipeViewPage.qml"
+ "pages/SwitchPage.qml"
+ "pages/TabBarPage.qml"
+ "pages/TextAreaPage.qml"
+ "pages/TextFieldPage.qml"
+ "pages/ToolTipPage.qml"
+ "pages/TumblerPage.qml"
+ "qtquickcontrols2.conf"
+)
+
+qt6_add_resources(gallery "qmake_immediate"
+ PREFIX
+ "/"
+ FILES
+ ${qmake_immediate_resource_files}
+)
+
+install(TARGETS gallery
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/quickcontrols2/gallery/CMakeLists.txt b/examples/quickcontrols2/gallery/CMakeLists.txt
index a175afa9..d4c9df04 100644
--- a/examples/quickcontrols2/gallery/CMakeLists.txt
+++ b/examples/quickcontrols2/gallery/CMakeLists.txt
@@ -1,7 +1,7 @@
# Generated from gallery.pro.
cmake_minimum_required(VERSION 3.14)
-project(gallery LANGUAGES CXX)
+project(gallery_controls2 LANGUAGES CXX) # special case
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -20,10 +20,10 @@ find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Quick)
find_package(Qt6 COMPONENTS QuickControls2)
-add_qt_gui_executable(gallery
+add_qt_gui_executable(gallery_controls2 # special case
gallery.cpp
)
-target_link_libraries(gallery PUBLIC
+target_link_libraries(gallery_controls2 PUBLIC # special case
Qt::Core
Qt::Gui
Qt::Quick
@@ -89,14 +89,14 @@ set(qmake_immediate_resource_files
"qtquickcontrols2.conf"
)
-qt6_add_resources(gallery "qmake_immediate"
+qt6_add_resources(gallery_controls2 "qmake_immediate" # special case
PREFIX
"/"
FILES
${qmake_immediate_resource_files}
)
-install(TARGETS gallery
+install(TARGETS gallery_controls2 # special case
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/quickcontrols2/gallery/gallery.cpp b/examples/quickcontrols2/gallery/gallery.cpp
index b4d59685..bbcd2d14 100644
--- a/examples/quickcontrols2/gallery/gallery.cpp
+++ b/examples/quickcontrols2/gallery/gallery.cpp
@@ -73,7 +73,11 @@ int main(int argc, char *argv[])
QQuickStyle::setStyle(settings.value("style").toString());
QQmlApplicationEngine engine;
- engine.rootContext()->setContextProperty("availableStyles", QQuickStyle::availableStyles());
+
+ const QStringList builtInStyles = { QLatin1String("Default"), QLatin1String("Fusion"),
+ QLatin1String("Imagine"), QLatin1String("Material"), QLatin1String("Universal") };
+ engine.rootContext()->setContextProperty("builtInStyles", builtInStyles);
+
engine.load(QUrl("qrc:/gallery.qml"));
if (engine.rootObjects().isEmpty())
return -1;
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml
index 504a36c7..872bdb44 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -48,12 +48,12 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import QtQuick.Controls 2.12
-import QtQuick.Controls.Material 2.12
-import QtQuick.Controls.Universal 2.12
-import Qt.labs.settings 1.0
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtQuick.Controls.Material
+import QtQuick.Controls.Universal
+import Qt.labs.settings
ApplicationWindow {
id: window
@@ -287,7 +287,7 @@ ApplicationWindow {
ComboBox {
id: styleBox
property int styleIndex: -1
- model: availableStyles
+ model: builtInStyles
Component.onCompleted: {
styleIndex = find(settings.style, Qt.MatchFixedString)
if (styleIndex !== -1)
diff --git a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml
index b0aa6284..867f5d28 100644
--- a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml
+++ b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/ButtonPage.qml b/examples/quickcontrols2/gallery/pages/ButtonPage.qml
index c77b41e4..38404570 100644
--- a/examples/quickcontrols2/gallery/pages/ButtonPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ButtonPage.qml
@@ -48,9 +48,9 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml
index 7795f814..39ea53ca 100644
--- a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml
+++ b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml
index ec75607c..04bb634a 100644
--- a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml b/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml
index 91110567..b0cc30c2 100644
--- a/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml
+++ b/examples/quickcontrols2/gallery/pages/DelayButtonPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/DelegatePage.qml b/examples/quickcontrols2/gallery/pages/DelegatePage.qml
index 20ceaa6b..d2064d98 100644
--- a/examples/quickcontrols2/gallery/pages/DelegatePage.qml
+++ b/examples/quickcontrols2/gallery/pages/DelegatePage.qml
@@ -48,9 +48,9 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
Pane {
padding: 0
diff --git a/examples/quickcontrols2/gallery/pages/DialPage.qml b/examples/quickcontrols2/gallery/pages/DialPage.qml
index 3bb3bb28..55519fb3 100644
--- a/examples/quickcontrols2/gallery/pages/DialPage.qml
+++ b/examples/quickcontrols2/gallery/pages/DialPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/DialogPage.qml b/examples/quickcontrols2/gallery/pages/DialogPage.qml
index 9d23e260..e5162b36 100644
--- a/examples/quickcontrols2/gallery/pages/DialogPage.qml
+++ b/examples/quickcontrols2/gallery/pages/DialogPage.qml
@@ -48,9 +48,9 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/FramePage.qml b/examples/quickcontrols2/gallery/pages/FramePage.qml
index 4834d04d..7fda3d66 100644
--- a/examples/quickcontrols2/gallery/pages/FramePage.qml
+++ b/examples/quickcontrols2/gallery/pages/FramePage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml
index 16f8762a..2a01297b 100644
--- a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml
+++ b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml
index 4f13ce33..612a942c 100644
--- a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml
+++ b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml
index 1f3c81b9..252e8eff 100644
--- a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml
index b573731e..41d4d34e 100644
--- a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml
+++ b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
index b6c35766..65f852ff 100644
--- a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
+++ b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml
index d9e77fa4..90c43965 100644
--- a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
Flickable {
id: flickable
diff --git a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml
index 2adcbc6b..301146ea 100644
--- a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
Flickable {
id: flickable
diff --git a/examples/quickcontrols2/gallery/pages/ScrollablePage.qml b/examples/quickcontrols2/gallery/pages/ScrollablePage.qml
index afb5ef5c..483159e7 100644
--- a/examples/quickcontrols2/gallery/pages/ScrollablePage.qml
+++ b/examples/quickcontrols2/gallery/pages/ScrollablePage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
Page {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/SliderPage.qml b/examples/quickcontrols2/gallery/pages/SliderPage.qml
index 93a1ebb1..5dcac2d8 100644
--- a/examples/quickcontrols2/gallery/pages/SliderPage.qml
+++ b/examples/quickcontrols2/gallery/pages/SliderPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml
index 9e458331..6fddbd27 100644
--- a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml
+++ b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/StackViewPage.qml b/examples/quickcontrols2/gallery/pages/StackViewPage.qml
index 43ee5684..fc2a4bdf 100644
--- a/examples/quickcontrols2/gallery/pages/StackViewPage.qml
+++ b/examples/quickcontrols2/gallery/pages/StackViewPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
StackView {
id: stackView
diff --git a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml
index 3c3bc56c..9cff5db8 100644
--- a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml
+++ b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
Pane {
id: pane
diff --git a/examples/quickcontrols2/gallery/pages/SwitchPage.qml b/examples/quickcontrols2/gallery/pages/SwitchPage.qml
index 53ee1660..2f4089a0 100644
--- a/examples/quickcontrols2/gallery/pages/SwitchPage.qml
+++ b/examples/quickcontrols2/gallery/pages/SwitchPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/TabBarPage.qml b/examples/quickcontrols2/gallery/pages/TabBarPage.qml
index 7c3cae44..b14df6d1 100644
--- a/examples/quickcontrols2/gallery/pages/TabBarPage.qml
+++ b/examples/quickcontrols2/gallery/pages/TabBarPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
Page {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml
index 7ed2b58b..91ecb16e 100644
--- a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml
+++ b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml
index 37a5d605..7ecdddc2 100644
--- a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml
+++ b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml
index 295ea2c4..eaae72b1 100644
--- a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml
+++ b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page
diff --git a/examples/quickcontrols2/gallery/pages/TumblerPage.qml b/examples/quickcontrols2/gallery/pages/TumblerPage.qml
index af4caee3..8a22a025 100644
--- a/examples/quickcontrols2/gallery/pages/TumblerPage.qml
+++ b/examples/quickcontrols2/gallery/pages/TumblerPage.qml
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.12
-import QtQuick.Controls 2.12
+import QtQuick
+import QtQuick.Controls
ScrollablePage {
id: page