aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/models
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-08-22 11:45:45 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-08-23 13:51:06 +0000
commitb938edcfb3aa2c78e35c9d63d995f6824e14eadf (patch)
tree593a1eb2158d47b67d422259721198956d9f9a7f /examples/quick/models
parent2be575b4b1e6f6e11a8dbd0b1c05c003828d2598 (diff)
Convert Examples
This patch converts all examples in qtdeclarative except for a few exceptions which require a public facing qml plugin api. Change-Id: I2cd2b1bb455be8b48796893a8235dea7f8b35aa2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'examples/quick/models')
-rw-r--r--examples/quick/models/CMakeLists.txt5
-rw-r--r--examples/quick/models/abstractitemmodel/CMakeLists.txt47
-rw-r--r--examples/quick/models/objectlistmodel/CMakeLists.txt47
-rw-r--r--examples/quick/models/stringlistmodel/CMakeLists.txt46
4 files changed, 145 insertions, 0 deletions
diff --git a/examples/quick/models/CMakeLists.txt b/examples/quick/models/CMakeLists.txt
new file mode 100644
index 0000000000..6beadd409c
--- /dev/null
+++ b/examples/quick/models/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from models.pro.
+
+add_subdirectory(abstractitemmodel)
+add_subdirectory(objectlistmodel)
+add_subdirectory(stringlistmodel)
diff --git a/examples/quick/models/abstractitemmodel/CMakeLists.txt b/examples/quick/models/abstractitemmodel/CMakeLists.txt
new file mode 100644
index 0000000000..772974d578
--- /dev/null
+++ b/examples/quick/models/abstractitemmodel/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from abstractitemmodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(abstractitemmodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(abstractitemmodel
+ main.cpp
+ model.cpp model.h
+)
+target_link_libraries(abstractitemmodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+# Resources:
+set(abstractitemmodel_resource_files
+ "view.qml"
+)
+
+QT6_ADD_RESOURCES(abstractitemmodel "abstractitemmodel"
+ PREFIX
+ "/"
+ FILES
+ ${abstractitemmodel_resource_files}
+)
+
+
+install(TARGETS abstractitemmodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/quick/models/objectlistmodel/CMakeLists.txt b/examples/quick/models/objectlistmodel/CMakeLists.txt
new file mode 100644
index 0000000000..b8be29ee4a
--- /dev/null
+++ b/examples/quick/models/objectlistmodel/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from objectlistmodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(objectlistmodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(objectlistmodel
+ dataobject.cpp dataobject.h
+ main.cpp
+)
+target_link_libraries(objectlistmodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+# Resources:
+set(objectlistmodel_resource_files
+ "view.qml"
+)
+
+QT6_ADD_RESOURCES(objectlistmodel "objectlistmodel"
+ PREFIX
+ "/"
+ FILES
+ ${objectlistmodel_resource_files}
+)
+
+
+install(TARGETS objectlistmodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/quick/models/stringlistmodel/CMakeLists.txt b/examples/quick/models/stringlistmodel/CMakeLists.txt
new file mode 100644
index 0000000000..6021c70991
--- /dev/null
+++ b/examples/quick/models/stringlistmodel/CMakeLists.txt
@@ -0,0 +1,46 @@
+# Generated from stringlistmodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(stringlistmodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Quick)
+
+add_qt_gui_executable(stringlistmodel
+ main.cpp
+)
+target_link_libraries(stringlistmodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Quick
+)
+
+# Resources:
+set(stringlistmodel_resource_files
+ "view.qml"
+)
+
+QT6_ADD_RESOURCES(stringlistmodel "stringlistmodel"
+ PREFIX
+ "/"
+ FILES
+ ${stringlistmodel_resource_files}
+)
+
+
+install(TARGETS stringlistmodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)