summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/itemviews')
-rw-r--r--examples/widgets/itemviews/CMakeLists.txt27
-rw-r--r--examples/widgets/itemviews/addressbook/CMakeLists.txt36
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt32
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/window.cpp4
-rw-r--r--examples/widgets/itemviews/chart/CMakeLists.txt52
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt33
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt32
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt47
-rw-r--r--examples/widgets/itemviews/dirview/CMakeLists.txt31
-rw-r--r--examples/widgets/itemviews/editabletreemodel/CMakeLists.txt47
-rw-r--r--examples/widgets/itemviews/fetchmore/CMakeLists.txt33
-rw-r--r--examples/widgets/itemviews/flattreeview/CMakeLists.txt31
-rw-r--r--examples/widgets/itemviews/frozencolumn/CMakeLists.txt45
-rw-r--r--examples/widgets/itemviews/interview/CMakeLists.txt47
-rw-r--r--examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt53
-rw-r--r--examples/widgets/itemviews/pixelator/CMakeLists.txt54
-rw-r--r--examples/widgets/itemviews/pixelator/mainwindow.cpp4
-rw-r--r--examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt47
-rw-r--r--examples/widgets/itemviews/puzzle/CMakeLists.txt47
-rw-r--r--examples/widgets/itemviews/simpledommodel/CMakeLists.txt36
-rw-r--r--examples/widgets/itemviews/simpletreemodel/CMakeLists.txt46
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt32
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt32
-rw-r--r--examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt54
-rw-r--r--examples/widgets/itemviews/spreadsheet/CMakeLists.txt60
-rw-r--r--examples/widgets/itemviews/stardelegate/CMakeLists.txt34
-rw-r--r--examples/widgets/itemviews/storageview/CMakeLists.txt32
27 files changed, 1024 insertions, 4 deletions
diff --git a/examples/widgets/itemviews/CMakeLists.txt b/examples/widgets/itemviews/CMakeLists.txt
new file mode 100644
index 0000000000..a1bd0c4dca
--- /dev/null
+++ b/examples/widgets/itemviews/CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from itemviews.pro.
+
+add_subdirectory(addressbook)
+add_subdirectory(basicsortfiltermodel)
+add_subdirectory(chart)
+add_subdirectory(coloreditorfactory)
+add_subdirectory(combowidgetmapper)
+add_subdirectory(customsortfiltermodel)
+add_subdirectory(dirview)
+add_subdirectory(editabletreemodel)
+add_subdirectory(fetchmore)
+add_subdirectory(flattreeview)
+add_subdirectory(frozencolumn)
+add_subdirectory(interview)
+add_subdirectory(pixelator)
+if(QT_FEATURE_draganddrop) # special case
+ add_subdirectory(puzzle)
+endif()
+if(TARGET Qt::Xml) # special case
+ add_subdirectory(simpledommodel)
+endif()
+add_subdirectory(simpletreemodel)
+add_subdirectory(simplewidgetmapper)
+add_subdirectory(spinboxdelegate)
+add_subdirectory(spreadsheet)
+add_subdirectory(stardelegate)
+add_subdirectory(storageview)
diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt
new file mode 100644
index 0000000000..5c14da9ac5
--- /dev/null
+++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from addressbook.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(addressbook LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/addressbook")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(addressbook
+ adddialog.cpp adddialog.h
+ addresswidget.cpp addresswidget.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ newaddresstab.cpp newaddresstab.h
+ tablemodel.cpp tablemodel.h
+)
+target_link_libraries(addressbook PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS addressbook
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
new file mode 100644
index 0000000000..90862ac0b0
--- /dev/null
+++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from basicsortfiltermodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(basicsortfiltermodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/basicsortfiltermodel")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(basicsortfiltermodel
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(basicsortfiltermodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS basicsortfiltermodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/window.cpp b/examples/widgets/itemviews/basicsortfiltermodel/window.cpp
index b45ee47ee2..bfc9044724 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel/window.cpp
+++ b/examples/widgets/itemviews/basicsortfiltermodel/window.cpp
@@ -89,9 +89,9 @@ Window::Window()
connect(filterPatternLineEdit, &QLineEdit::textChanged,
this, &Window::filterRegExpChanged);
- connect(filterSyntaxComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(filterSyntaxComboBox, &QComboBox::currentIndexChanged,
this, &Window::filterRegExpChanged);
- connect(filterColumnComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
+ connect(filterColumnComboBox, &QComboBox::currentIndexChanged,
this, &Window::filterColumnChanged);
connect(filterCaseSensitivityCheckBox, &QAbstractButton::toggled,
this, &Window::filterRegExpChanged);
diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt
new file mode 100644
index 0000000000..5788215de6
--- /dev/null
+++ b/examples/widgets/itemviews/chart/CMakeLists.txt
@@ -0,0 +1,52 @@
+# Generated from chart.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chart LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/chart")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(chart
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pieview.cpp pieview.h
+)
+target_link_libraries(chart PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(chart_resource_files
+ "qtdata.cht"
+)
+
+qt6_add_resources(chart "chart"
+ PREFIX
+ "/Charts"
+ FILES
+ ${chart_resource_files}
+)
+
+if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS)
+ target_link_libraries(chart PUBLIC
+ m
+ )
+endif()
+
+install(TARGETS chart
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
new file mode 100644
index 0000000000..3ec96a2fc4
--- /dev/null
+++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from coloreditorfactory.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(coloreditorfactory LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/coloreditorfactory")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(coloreditorfactory
+ colorlisteditor.cpp colorlisteditor.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(coloreditorfactory PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS coloreditorfactory
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
new file mode 100644
index 0000000000..c8a0bc1438
--- /dev/null
+++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from combowidgetmapper.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(combowidgetmapper LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/combowidgetmapper")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(combowidgetmapper
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(combowidgetmapper PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS combowidgetmapper
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
new file mode 100644
index 0000000000..859b88a397
--- /dev/null
+++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from customsortfiltermodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(customsortfiltermodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/customsortfiltermodel")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(customsortfiltermodel
+ filterwidget.cpp filterwidget.h
+ main.cpp
+ mysortfilterproxymodel.cpp mysortfilterproxymodel.h
+ window.cpp window.h
+)
+target_link_libraries(customsortfiltermodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(customsortfiltermodel_resource_files
+ "images/find.png"
+)
+
+qt6_add_resources(customsortfiltermodel "customsortfiltermodel"
+ PREFIX
+ "/"
+ FILES
+ ${customsortfiltermodel_resource_files}
+)
+
+install(TARGETS customsortfiltermodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt
new file mode 100644
index 0000000000..6cb902c092
--- /dev/null
+++ b/examples/widgets/itemviews/dirview/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from dirview.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(dirview LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/dirview")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(dirview
+ main.cpp
+)
+target_link_libraries(dirview PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS dirview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
new file mode 100644
index 0000000000..faae8e1a80
--- /dev/null
+++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from editabletreemodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(editabletreemodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/editabletreemodel")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(editabletreemodel
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ treeitem.cpp treeitem.h
+ treemodel.cpp treemodel.h
+)
+target_link_libraries(editabletreemodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(editabletreemodel_resource_files
+ "default.txt"
+)
+
+qt6_add_resources(editabletreemodel "editabletreemodel"
+ PREFIX
+ "/"
+ FILES
+ ${editabletreemodel_resource_files}
+)
+
+install(TARGETS editabletreemodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
new file mode 100644
index 0000000000..fea985d049
--- /dev/null
+++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from fetchmore.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(fetchmore LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/fetchmore")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(fetchmore
+ filelistmodel.cpp filelistmodel.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(fetchmore PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS fetchmore
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
new file mode 100644
index 0000000000..c0c4ef6146
--- /dev/null
+++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from flattreeview.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(flattreeview LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/flattreeview")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(flattreeview
+ main.cpp
+)
+target_link_libraries(flattreeview PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS flattreeview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
new file mode 100644
index 0000000000..dab2e0a153
--- /dev/null
+++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
@@ -0,0 +1,45 @@
+# Generated from frozencolumn.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(frozencolumn LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/frozencolumn")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(frozencolumn
+ freezetablewidget.cpp freezetablewidget.h
+ main.cpp
+)
+target_link_libraries(frozencolumn PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(grades_resource_files
+ "grades.txt"
+)
+
+qt6_add_resources(frozencolumn "grades"
+ PREFIX
+ "/"
+ FILES
+ ${grades_resource_files}
+)
+
+install(TARGETS frozencolumn
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt
new file mode 100644
index 0000000000..c27018ffa4
--- /dev/null
+++ b/examples/widgets/itemviews/interview/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from interview.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(interview LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/interview")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(interview
+ main.cpp
+ model.cpp model.h
+)
+target_link_libraries(interview PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(interview_resource_files
+ "images/folder.png"
+ "images/interview.png"
+ "images/services.png"
+)
+
+qt6_add_resources(interview "interview"
+ PREFIX
+ "/"
+ FILES
+ ${interview_resource_files}
+)
+
+install(TARGETS interview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt b/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1c8ccc6f81
--- /dev/null
+++ b/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
@@ -0,0 +1,53 @@
+# Generated from pixelator.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(pixelator LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/pixelator")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(pixelator
+ imagemodel.cpp imagemodel.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pixeldelegate.cpp pixeldelegate.h
+)
+target_link_libraries(pixelator PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(images_resource_files
+ "images/qt.png"
+)
+
+qt6_add_resources(pixelator "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(pixelator PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS pixelator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt
new file mode 100644
index 0000000000..aba494c31a
--- /dev/null
+++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt
@@ -0,0 +1,54 @@
+# Generated from pixelator.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(pixelator LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/pixelator")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS PrintSupport) # special case
+
+add_qt_gui_executable(pixelator
+ imagemodel.cpp imagemodel.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pixeldelegate.cpp pixeldelegate.h
+)
+target_link_libraries(pixelator PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(images_resource_files
+ "images/qt.png"
+)
+
+qt6_add_resources(pixelator "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(pixelator PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS pixelator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/pixelator/mainwindow.cpp b/examples/widgets/itemviews/pixelator/mainwindow.cpp
index abd4a8b1ab..e590a1397b 100644
--- a/examples/widgets/itemviews/pixelator/mainwindow.cpp
+++ b/examples/widgets/itemviews/pixelator/mainwindow.cpp
@@ -116,9 +116,9 @@ MainWindow::MainWindow()
connect(quitAction, &QAction::triggered, qApp, &QCoreApplication::quit);
connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutBox);
//! [4]
- connect(pixelSizeSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ connect(pixelSizeSpinBox, &QSpinBox::valueChanged,
delegate, &PixelDelegate::setPixelSize);
- connect(pixelSizeSpinBox, QOverload<int>::of(&QSpinBox::valueChanged),
+ connect(pixelSizeSpinBox, &QSpinBox::valueChanged,
this, &MainWindow::updateView);
//! [4]
diff --git a/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt b/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..17765e9d47
--- /dev/null
+++ b/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from puzzle.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(puzzle LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/puzzle")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(puzzle
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ piecesmodel.cpp piecesmodel.h
+ puzzlewidget.cpp puzzlewidget.h
+)
+target_link_libraries(puzzle PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(puzzle_resource_files
+ "example.jpg"
+)
+
+qt6_add_resources(puzzle "puzzle"
+ PREFIX
+ "/images"
+ FILES
+ ${puzzle_resource_files}
+)
+
+install(TARGETS puzzle
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt
new file mode 100644
index 0000000000..53494d37f1
--- /dev/null
+++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from puzzle.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(puzzle LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/puzzle")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(itemviews_puzzle # special case: renamed puzzle
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ piecesmodel.cpp piecesmodel.h
+ puzzlewidget.cpp puzzlewidget.h
+)
+target_link_libraries(itemviews_puzzle PUBLIC # special case
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(puzzle_resource_files
+ "example.jpg"
+)
+
+qt6_add_resources(itemviews_puzzle "puzzle"
+ PREFIX
+ "/images"
+ FILES
+ ${puzzle_resource_files}
+)
+
+install(TARGETS itemviews_puzzle # special case: renamed puzzle
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
new file mode 100644
index 0000000000..e22e3fe1ad
--- /dev/null
+++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated from simpledommodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(simpledommodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simpledommodel")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Xml)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(simpledommodel
+ domitem.cpp domitem.h
+ dommodel.cpp dommodel.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(simpledommodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+ Qt::Xml
+)
+
+install(TARGETS simpledommodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
new file mode 100644
index 0000000000..8a6607e584
--- /dev/null
+++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
@@ -0,0 +1,46 @@
+# Generated from simpletreemodel.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(simpletreemodel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simpletreemodel")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(simpletreemodel
+ main.cpp
+ treeitem.cpp treeitem.h
+ treemodel.cpp treemodel.h
+)
+target_link_libraries(simpletreemodel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(simpletreemodel_resource_files
+ "default.txt"
+)
+
+qt6_add_resources(simpletreemodel "simpletreemodel"
+ PREFIX
+ "/"
+ FILES
+ ${simpletreemodel_resource_files}
+)
+
+install(TARGETS simpletreemodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
new file mode 100644
index 0000000000..163dc98e2c
--- /dev/null
+++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from simplewidgetmapper.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(simplewidgetmapper LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simplewidgetmapper")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(simplewidgetmapper
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(simplewidgetmapper PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS simplewidgetmapper
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
new file mode 100644
index 0000000000..b73158cd5a
--- /dev/null
+++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from spinboxdelegate.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(spinboxdelegate LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spinboxdelegate")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(spinboxdelegate
+ delegate.cpp delegate.h
+ main.cpp
+)
+target_link_libraries(spinboxdelegate PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS spinboxdelegate
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..acf5f187fe
--- /dev/null
+++ b/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
@@ -0,0 +1,54 @@
+# Generated from spreadsheet.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(spreadsheet LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spreadsheet")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(spreadsheet
+ main.cpp
+ printview.cpp printview.h
+ spreadsheet.cpp spreadsheet.h
+ spreadsheetdelegate.cpp spreadsheetdelegate.h
+ spreadsheetitem.cpp spreadsheetitem.h
+)
+target_link_libraries(spreadsheet PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(spreadsheet_resource_files
+ "images/interview.png"
+)
+
+qt6_add_resources(spreadsheet "spreadsheet"
+ PREFIX
+ "/"
+ FILES
+ ${spreadsheet_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(spreadsheet PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS spreadsheet
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
new file mode 100644
index 0000000000..b1fc6ff01a
--- /dev/null
+++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
@@ -0,0 +1,60 @@
+# Generated from spreadsheet.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(spreadsheet LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spreadsheet")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+find_package(Qt6 COMPONENTS PrintSupport) # special case
+
+add_qt_gui_executable(spreadsheet
+ main.cpp
+ printview.cpp printview.h
+ spreadsheet.cpp spreadsheet.h
+ spreadsheetdelegate.cpp spreadsheetdelegate.h
+ spreadsheetitem.cpp spreadsheetitem.h
+)
+target_link_libraries(spreadsheet PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(spreadsheet PUBLIC Qt::PrintSupport)
+endif()
+# special case end
+
+
+# Resources:
+set(spreadsheet_resource_files
+ "images/interview.png"
+)
+
+qt6_add_resources(spreadsheet "spreadsheet"
+ PREFIX
+ "/"
+ FILES
+ ${spreadsheet_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(spreadsheet PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS spreadsheet
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
new file mode 100644
index 0000000000..5f6f660488
--- /dev/null
+++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from stardelegate.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(stardelegate LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/stardelegate")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(stardelegate
+ main.cpp
+ stardelegate.cpp stardelegate.h
+ stareditor.cpp stareditor.h
+ starrating.cpp starrating.h
+)
+target_link_libraries(stardelegate PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS stardelegate
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt
new file mode 100644
index 0000000000..99b4f13861
--- /dev/null
+++ b/examples/widgets/itemviews/storageview/CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from storageview.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(storageview LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/storageview")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(storageview
+ main.cpp
+ storagemodel.cpp storagemodel.h
+)
+target_link_libraries(storageview PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS storageview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)