summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/animation/easing/CMakeLists.txt2
-rw-r--r--examples/widgets/desktop/screenshot/CMakeLists.txt2
-rw-r--r--examples/widgets/desktop/systray/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/classwizard/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/extension/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/findfiles/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/licensewizard/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/standarddialogs/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/standarddialogs/main.cpp15
-rw-r--r--examples/widgets/dialogs/tabdialog/CMakeLists.txt2
-rw-r--r--examples/widgets/dialogs/trivialwizard/CMakeLists.txt2
-rw-r--r--examples/widgets/draganddrop/draggableicons/CMakeLists.txt2
-rw-r--r--examples/widgets/draganddrop/draggabletext/CMakeLists.txt2
-rw-r--r--examples/widgets/draganddrop/dropsite/CMakeLists.txt2
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt2
-rw-r--r--examples/widgets/draganddrop/puzzle/CMakeLists.txt2
-rw-r--r--examples/widgets/effects/blurpicker/CMakeLists.txt2
-rw-r--r--examples/widgets/effects/fademessage/CMakeLists.txt2
-rw-r--r--examples/widgets/gallery/CMakeLists.txt2
-rw-r--r--examples/widgets/gestures/imagegestures/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/anchorlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/chip/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/collidingmice/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/diagramscene/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/elasticnodes/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/flowlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/addressbook/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/chart/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/dirview/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/editabletreemodel/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/fetchmore/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/flattreeview/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/frozencolumn/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/interview/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/pixelator/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/puzzle/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/simpledommodel/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/simpletreemodel/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/spreadsheet/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/stardelegate/CMakeLists.txt2
-rw-r--r--examples/widgets/itemviews/storageview/CMakeLists.txt2
-rw-r--r--examples/widgets/layouts/basiclayouts/CMakeLists.txt2
-rw-r--r--examples/widgets/layouts/borderlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/layouts/dynamiclayouts/CMakeLists.txt2
-rw-r--r--examples/widgets/layouts/flowlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/mainwindows/application/CMakeLists.txt2
-rw-r--r--examples/widgets/mainwindows/dockwidgets/CMakeLists.txt2
-rw-r--r--examples/widgets/mainwindows/mainwindow/CMakeLists.txt2
-rw-r--r--examples/widgets/mainwindows/mdi/CMakeLists.txt2
-rw-r--r--examples/widgets/mainwindows/menus/CMakeLists.txt2
-rw-r--r--examples/widgets/mainwindows/sdi/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/affine/xform.cpp93
-rw-r--r--examples/widgets/painting/affine/xform.h16
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/deform/pathdeform.cpp2
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt2
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.cpp30
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.h18
-rw-r--r--examples/widgets/painting/shared/hoverpoints.cpp368
-rw-r--r--examples/widgets/painting/shared/hoverpoints.h28
-rw-r--r--examples/widgets/painting/transformations/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/calendar/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/orderform/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt2
-rw-r--r--examples/widgets/richtext/textedit/example.html9
-rw-r--r--examples/widgets/scroller/graphicsview/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/completer/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/customcompleter/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/echoplugin/CMakeLists.txt17
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt35
-rw-r--r--examples/widgets/tools/echoplugin/plugin/CMakeLists.txt29
-rw-r--r--examples/widgets/tools/i18n/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/plugandpaint/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt11
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt14
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt10
-rw-r--r--examples/widgets/tools/regularexpression/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/settingseditor/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/styleplugin/CMakeLists.txt16
-rw-r--r--examples/widgets/tools/styleplugin/plugin/CMakeLists.txt31
-rw-r--r--examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt28
-rw-r--r--examples/widgets/tools/treemodelcompleter/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/undo/CMakeLists.txt2
-rw-r--r--examples/widgets/tools/undoframework/CMakeLists.txt2
-rw-r--r--examples/widgets/touch/dials/CMakeLists.txt2
-rw-r--r--examples/widgets/touch/fingerpaint/CMakeLists.txt2
-rw-r--r--examples/widgets/touch/knobs/CMakeLists.txt2
-rw-r--r--examples/widgets/touch/pinchzoom/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part1/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part2/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part3/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part4/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part5/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part6/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/addressbook/part7/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/notepad/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt2
-rw-r--r--examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/analogclock/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/calculator/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/calendarwidget/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/charactermap/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/codeeditor/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/digitalclock/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/elidedlabel/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/groupbox/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/icons/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/imageviewer/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/lineedits/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/mousebuttons/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/movie/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/scribble/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/shapedclock/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/sliders/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/spinboxes/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/styles/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/stylesheet/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/tablet/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/tetrix/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/tetrix/tetrixwindow.cpp9
-rw-r--r--examples/widgets/widgets/tooltips/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/validators/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/wiggly/CMakeLists.txt2
-rw-r--r--examples/widgets/widgets/windowflags/CMakeLists.txt2
-rw-r--r--examples/widgets/windowcontainer/CMakeLists.txt2
160 files changed, 472 insertions, 591 deletions
diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt
index 7e36ed78c4..4a577c5c0c 100644
--- a/examples/widgets/animation/easing/CMakeLists.txt
+++ b/examples/widgets/animation/easing/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from easing.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(easing LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt
index 2dc1b9909e..bbc525c719 100644
--- a/examples/widgets/desktop/screenshot/CMakeLists.txt
+++ b/examples/widgets/desktop/screenshot/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from screenshot.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(screenshot LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/desktop/systray/CMakeLists.txt b/examples/widgets/desktop/systray/CMakeLists.txt
index e1d1ca526b..f52a523ad4 100644
--- a/examples/widgets/desktop/systray/CMakeLists.txt
+++ b/examples/widgets/desktop/systray/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from systray.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(systray LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/classwizard/CMakeLists.txt b/examples/widgets/dialogs/classwizard/CMakeLists.txt
index 5134db62be..b45c5bbc15 100644
--- a/examples/widgets/dialogs/classwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from classwizard.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(classwizard LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/extension/CMakeLists.txt b/examples/widgets/dialogs/extension/CMakeLists.txt
index 37d75d2cc1..be555e6a10 100644
--- a/examples/widgets/dialogs/extension/CMakeLists.txt
+++ b/examples/widgets/dialogs/extension/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from extension.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(extension LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt
index 1d60d743f2..cf183d29e2 100644
--- a/examples/widgets/dialogs/findfiles/CMakeLists.txt
+++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from findfiles.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(findfiles LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
index df0b205cab..7fc7ac65fa 100644
--- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from licensewizard.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(licensewizard LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
index b42e3a81c7..9cb52e22dd 100644
--- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
+++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from standarddialogs.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(standarddialogs LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/standarddialogs/main.cpp b/examples/widgets/dialogs/standarddialogs/main.cpp
index 3892c02f9d..7e7a5ce95b 100644
--- a/examples/widgets/dialogs/standarddialogs/main.cpp
+++ b/examples/widgets/dialogs/standarddialogs/main.cpp
@@ -60,16 +60,17 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QGuiApplication::setApplicationDisplayName(Dialog::tr("Standard Dialogs"));
-#ifndef QT_NO_TRANSLATION
- QString translatorFileName = QLatin1String("qtbase_");
- translatorFileName += QLocale::system().name();
- QTranslator *translator = new QTranslator(&app);
- if (translator->load(translatorFileName, QLibraryInfo::path(QLibraryInfo::TranslationsPath)))
- app.installTranslator(translator);
+#if QT_CONFIG(translation)
+ QTranslator translator;
+ if (translator.load(QLocale::system(), u"qtbase"_qs, u"_"_qs,
+ QLibraryInfo::path(QLibraryInfo::TranslationsPath))) {
+ app.installTranslator(&translator);
+ }
#endif
+ QGuiApplication::setApplicationDisplayName(Dialog::tr("Standard Dialogs"));
+
Dialog dialog;
if (!QGuiApplication::styleHints()->showIsFullScreen() && !QGuiApplication::styleHints()->showIsMaximized()) {
const QRect availableGeometry = dialog.screen()->availableGeometry();
diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
index 8e8ad4213a..b61a8ef89c 100644
--- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt
+++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from tabdialog.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(tabdialog LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
index 4c67d8cdb6..d57cbd59c3 100644
--- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from trivialwizard.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(trivialwizard LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
index 894f8ba520..8c64fc9335 100644
--- a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from draggableicons.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(draggableicons LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
index d2da6acddb..c4fced0f89 100644
--- a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from draggabletext.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(draggabletext LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/draganddrop/dropsite/CMakeLists.txt b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
index aac6d005b7..ee29b665a5 100644
--- a/examples/widgets/draganddrop/dropsite/CMakeLists.txt
+++ b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from dropsite.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dropsite LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
index 3f8b9108ae..0292d661ac 100644
--- a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
+++ b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from fridgemagnets.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(fridgemagnets LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/draganddrop/puzzle/CMakeLists.txt b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
index b7569fb0d2..27ce443ffa 100644
--- a/examples/widgets/draganddrop/puzzle/CMakeLists.txt
+++ b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from puzzle.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(puzzle LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/effects/blurpicker/CMakeLists.txt b/examples/widgets/effects/blurpicker/CMakeLists.txt
index f24fa685c0..b0e3a08016 100644
--- a/examples/widgets/effects/blurpicker/CMakeLists.txt
+++ b/examples/widgets/effects/blurpicker/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from blurpicker.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(blurpicker LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/effects/fademessage/CMakeLists.txt b/examples/widgets/effects/fademessage/CMakeLists.txt
index 2de3b9b131..96e8f08df4 100644
--- a/examples/widgets/effects/fademessage/CMakeLists.txt
+++ b/examples/widgets/effects/fademessage/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from fademessage.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(fademessage LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/gallery/CMakeLists.txt b/examples/widgets/gallery/CMakeLists.txt
index f3afe22109..dacc09fcb1 100644
--- a/examples/widgets/gallery/CMakeLists.txt
+++ b/examples/widgets/gallery/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from gallery.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(gallery LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/gestures/imagegestures/CMakeLists.txt b/examples/widgets/gestures/imagegestures/CMakeLists.txt
index 994fba8c04..17b7a61103 100644
--- a/examples/widgets/gestures/imagegestures/CMakeLists.txt
+++ b/examples/widgets/gestures/imagegestures/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from imagegestures.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(imagegestures LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
index 9d500bace4..9b6db3a2f0 100644
--- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from anchorlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(anchorlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
index a699a75a87..f98e5c78b3 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from basicgraphicslayouts.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(basicgraphicslayouts LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt
index cb3e95a43c..6b8160e2a8 100644
--- a/examples/widgets/graphicsview/chip/CMakeLists.txt
+++ b/examples/widgets/graphicsview/chip/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from chip.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(chip LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
index 6b13244042..143c45a7d6 100644
--- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
+++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from collidingmice.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(collidingmice LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
index 89bcc6f4cb..2d2ad96576 100644
--- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
+++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from diagramscene.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(diagramscene LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
index 9cf79ba53e..584adb2160 100644
--- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
+++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from dragdroprobot.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dragdroprobot LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
index c25df365fb..f14cf835e6 100644
--- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from elasticnodes.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(elasticnodes LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
index 5f69077802..b63e15d785 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
+++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from embeddeddialogs.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(embeddeddialogs LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
index 4062c1d902..9c44ec575d 100644
--- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from flowlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(flowlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
index 8403fb0a0a..e4118c0d87 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from simpleanchorlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(simpleanchorlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
index 43bd29452e..2aa69e59a0 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from weatheranchorlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(weatheranchorlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt
index 0383a1edf8..6127008fdc 100644
--- a/examples/widgets/itemviews/addressbook/CMakeLists.txt
+++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from addressbook.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(addressbook LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
index cd70de6907..3bc56f1c5b 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from basicsortfiltermodel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(basicsortfiltermodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt
index c0a9d66099..82771605d2 100644
--- a/examples/widgets/itemviews/chart/CMakeLists.txt
+++ b/examples/widgets/itemviews/chart/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from chart.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(chart LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
index 478c61dec7..3887a4b162 100644
--- a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
+++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from coloreditorfactory.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(coloreditorfactory LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
index b239e434e2..07df054d50 100644
--- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from combowidgetmapper.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(combowidgetmapper LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
index 9b20b76a9a..3da9b7d327 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from customsortfiltermodel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(customsortfiltermodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt
index 27ce1bc144..86d87c2ae1 100644
--- a/examples/widgets/itemviews/dirview/CMakeLists.txt
+++ b/examples/widgets/itemviews/dirview/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from dirview.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dirview LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
index 6ef311d960..4302519b55 100644
--- a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from editabletreemodel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(editabletreemodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
index 35ddc52aab..ffc45b8339 100644
--- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt
+++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from fetchmore.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(fetchmore LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
index 893f19d4ba..3464f82c24 100644
--- a/examples/widgets/itemviews/flattreeview/CMakeLists.txt
+++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from flattreeview.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(flattreeview LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
index d27dc6e88b..1bd4df20a5 100644
--- a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
+++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from frozencolumn.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(frozencolumn LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt
index 7c4e6a4fe7..cf5c9abe7d 100644
--- a/examples/widgets/itemviews/interview/CMakeLists.txt
+++ b/examples/widgets/itemviews/interview/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from interview.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(interview LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt
index 10a89e4343..1960b7089e 100644
--- a/examples/widgets/itemviews/pixelator/CMakeLists.txt
+++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from pixelator.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(pixelator LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt
index bfc597f2da..70a3dbab47 100644
--- a/examples/widgets/itemviews/puzzle/CMakeLists.txt
+++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from puzzle.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(puzzle LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
index 4381e6ad1a..70c6fe2e4b 100644
--- a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from simpledommodel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(simpledommodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
index 0fd9ebc9df..6c7bc4d097 100644
--- a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from simpletreemodel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(simpletreemodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
index aae13df180..627ec07633 100644
--- a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from simplewidgetmapper.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(simplewidgetmapper LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
index 88bfd6b9c3..413bfa0945 100644
--- a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from spinboxdelegate.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(spinboxdelegate LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
index a5a9a52574..2f0aa028ea 100644
--- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
+++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from spreadsheet.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(spreadsheet LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
index 947fdb96a7..7f89abe524 100644
--- a/examples/widgets/itemviews/stardelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from stardelegate.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(stardelegate LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt
index 173aa7ca89..22f1724ed1 100644
--- a/examples/widgets/itemviews/storageview/CMakeLists.txt
+++ b/examples/widgets/itemviews/storageview/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from storageview.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(storageview LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/layouts/basiclayouts/CMakeLists.txt b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
index fdfc452e19..a3c99e2d4a 100644
--- a/examples/widgets/layouts/basiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from basiclayouts.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(basiclayouts LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/layouts/borderlayout/CMakeLists.txt b/examples/widgets/layouts/borderlayout/CMakeLists.txt
index 7ea6a0496e..92030252ba 100644
--- a/examples/widgets/layouts/borderlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/borderlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from borderlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(borderlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
index 3bfa44da47..e969f21cb0 100644
--- a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from dynamiclayouts.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dynamiclayouts LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/layouts/flowlayout/CMakeLists.txt b/examples/widgets/layouts/flowlayout/CMakeLists.txt
index deafab4d80..ef6d970ad9 100644
--- a/examples/widgets/layouts/flowlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/flowlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from flowlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(flowlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt
index 53354d0460..483edcda4a 100644
--- a/examples/widgets/mainwindows/application/CMakeLists.txt
+++ b/examples/widgets/mainwindows/application/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from application.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(application LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
index 308960e547..faf964f2d3 100644
--- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
+++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from dockwidgets.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dockwidgets LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
index 88d1c7ddf7..3d26b5d632 100644
--- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from mainwindow.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mainwindow LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt
index 1c9aac9a33..c34d0e9ad7 100644
--- a/examples/widgets/mainwindows/mdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from mdi.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mdi LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt
index ba32b3086a..c2c97b9f64 100644
--- a/examples/widgets/mainwindows/menus/CMakeLists.txt
+++ b/examples/widgets/mainwindows/menus/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from menus.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(menus LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt
index 111b127e38..4a255be50b 100644
--- a/examples/widgets/mainwindows/sdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from sdi.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(sdi LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index 21f6c41028..8594017d30 100644
--- a/examples/widgets/painting/affine/CMakeLists.txt
+++ b/examples/widgets/painting/affine/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from affine.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(affine LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/affine/xform.cpp b/examples/widgets/painting/affine/xform.cpp
index d7ed2125d2..a18d6fb71b 100644
--- a/examples/widgets/painting/affine/xform.cpp
+++ b/examples/widgets/painting/affine/xform.cpp
@@ -58,27 +58,22 @@
const int alpha = 155;
XFormView::XFormView(QWidget *parent)
- : ArthurFrame(parent)
+ : ArthurFrame(parent),
+ m_pixmap(QPixmap(":res/affine/bg1.jpg"))
{
setAttribute(Qt::WA_MouseTracking);
- m_type = VectorType;
- m_rotation = 0.0;
- m_scale = 1.0;
- m_shear = 0.0;
-
- m_pixmap = QPixmap(":res/affine/bg1.jpg");
- pts = new HoverPoints(this, HoverPoints::CircleShape);
- pts->setConnectionType(HoverPoints::LineConnection);
- pts->setEditable(false);
- pts->setPointSize(QSize(15, 15));
- pts->setShapeBrush(QBrush(QColor(151, 0, 0, alpha)));
- pts->setShapePen(QPen(QColor(255, 100, 50, alpha)));
- pts->setConnectionPen(QPen(QColor(151, 0, 0, 50)));
- pts->setBoundingRect(QRectF(0, 0, 500, 500));
- ctrlPoints << QPointF(250, 250) << QPointF(350, 250);
- pts->setPoints(ctrlPoints);
- connect(pts, &HoverPoints::pointsChanged,
- this,&XFormView::updateCtrlPoints);
+
+ m_hoverPoints = new HoverPoints(this, HoverPoints::CircleShape);
+ m_hoverPoints->setConnectionType(HoverPoints::LineConnection);
+ m_hoverPoints->setEditable(false);
+ m_hoverPoints->setPointSize(QSize(15, 15));
+ m_hoverPoints->setShapeBrush(QBrush(QColor(151, 0, 0, alpha)));
+ m_hoverPoints->setShapePen(QPen(QColor(255, 100, 50, alpha)));
+ m_hoverPoints->setConnectionPen(QPen(QColor(151, 0, 0, 50)));
+ m_hoverPoints->setBoundingRect(QRectF(0, 0, 500, 500));
+ m_hoverPoints->setPoints(m_controlPoints);
+ connect(m_hoverPoints, &HoverPoints::pointsChanged,
+ this, &XFormView::updateControlPoints);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
}
@@ -122,7 +117,7 @@ void XFormView::mousePressEvent(QMouseEvent *)
void XFormView::resizeEvent(QResizeEvent *e)
{
- pts->setBoundingRect(rect());
+ m_hoverPoints->setBoundingRect(rect());
ArthurFrame::resizeEvent(e);
}
@@ -145,24 +140,24 @@ void XFormView::paint(QPainter *p)
p->restore();
}
-void XFormView::updateCtrlPoints(const QPolygonF &points)
+void XFormView::updateControlPoints(const QPolygonF &points)
{
- QPointF trans = points.at(0) - ctrlPoints.at(0);
+ QPointF trans = points.at(0) - m_controlPoints.at(0);
if (qAbs(points.at(0).x() - points.at(1).x()) < 10
&& qAbs(points.at(0).y() - points.at(1).y()) < 10)
- pts->setPoints(ctrlPoints);
+ m_hoverPoints->setPoints(m_controlPoints);
if (!trans.isNull()) {
- ctrlPoints[0] = points.at(0);
- ctrlPoints[1] += trans;
- pts->setPoints(ctrlPoints);
+ m_controlPoints[0] = points.at(0);
+ m_controlPoints[1] += trans;
+ m_hoverPoints->setPoints(m_controlPoints);
}
- ctrlPoints = points;
+ m_controlPoints = points;
- QLineF line(ctrlPoints.at(0), ctrlPoints.at(1));
+ QLineF line(m_controlPoints.at(0), m_controlPoints.at(1));
m_rotation = 360 - QLineF(0, 0, 1, 0).angleTo(line);
if (trans.isNull())
- emit rotationChanged(int(m_rotation*10));
+ emit rotationChanged(int(m_rotation * 10));
}
void XFormView::setVectorType()
@@ -222,12 +217,12 @@ void XFormView::setRotation(qreal r)
qreal old_rot = m_rotation;
m_rotation = r;
- QPointF center(pts->points().at(0));
+ QPointF center(m_hoverPoints->points().at(0));
QTransform m;
m.translate(center.x(), center.y());
m.rotate(m_rotation - old_rot);
m.translate(-center.x(), -center.y());
- pts->setPoints(pts->points() * m);
+ m_hoverPoints->setPoints(m_hoverPoints->points() * m);
update();
}
@@ -235,12 +230,12 @@ void XFormView::setRotation(qreal r)
void XFormView::timerEvent(QTimerEvent *e)
{
if (e->timerId() == timer.timerId()) {
- QPointF center(pts->points().at(0));
+ QPointF center(m_hoverPoints->points().at(0));
QTransform m;
m.translate(center.x(), center.y());
m.rotate(0.2);
m.translate(-center.x(), -center.y());
- pts->setPoints(pts->points() * m);
+ m_hoverPoints->setPoints(m_hoverPoints->points() * m);
setUpdatesEnabled(false);
static qreal scale_inc = 0.003;
@@ -253,7 +248,7 @@ void XFormView::timerEvent(QTimerEvent *e)
shear_inc = -shear_inc;
setUpdatesEnabled(true);
- pts->firePointChange();
+ m_hoverPoints->firePointChange();
}
}
@@ -271,16 +266,15 @@ void XFormView::reset()
emit rotationChanged(0);
emit scaleChanged(1000);
emit shearChanged(0);
- ctrlPoints = QPolygonF();
- ctrlPoints << QPointF(250, 250) << QPointF(350, 250);
- pts->setPoints(ctrlPoints);
- pts->firePointChange();
+ m_controlPoints = {{250, 250}, {350, 250}};
+ m_hoverPoints->setPoints(m_controlPoints);
+ m_hoverPoints->firePointChange();
}
void XFormView::drawPixmapType(QPainter *painter)
{
QPointF center(m_pixmap.width() / qreal(2), m_pixmap.height() / qreal(2));
- painter->translate(ctrlPoints.at(0) - center);
+ painter->translate(m_controlPoints.at(0) - center);
painter->translate(center);
painter->rotate(m_rotation);
@@ -289,9 +283,11 @@ void XFormView::drawPixmapType(QPainter *painter)
painter->translate(-center);
painter->drawPixmap(QPointF(0, 0), m_pixmap);
- painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25, Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
+ painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25,
+ Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
painter->setBrush(Qt::NoBrush);
- painter->drawRect(QRectF(0, 0, m_pixmap.width(), m_pixmap.height()).adjusted(-2, -2, 2, 2));
+ painter->drawRect(QRectF(0, 0, m_pixmap.width(),
+ m_pixmap.height()).adjusted(-2, -2, 2, 2));
}
void XFormView::drawTextType(QPainter *painter)
@@ -306,7 +302,7 @@ void XFormView::drawTextType(QPainter *painter)
QFontMetrics fm(f);
QRectF br(fm.boundingRect(m_text));
QPointF center(br.center());
- painter->translate(ctrlPoints.at(0) - center);
+ painter->translate(m_controlPoints.at(0) - center);
painter->translate(center);
painter->rotate(m_rotation);
@@ -316,7 +312,8 @@ void XFormView::drawTextType(QPainter *painter)
painter->fillPath(path, Qt::black);
- painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25, Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
+ painter->setPen(QPen(QColor(255, 0, 0, alpha), 0.25,
+ Qt::SolidLine, Qt::FlatCap, Qt::BevelJoin));
painter->setBrush(Qt::NoBrush);
painter->drawRect(br.adjusted(-1, -1, 1, 1));
}
@@ -324,7 +321,7 @@ void XFormView::drawTextType(QPainter *painter)
void XFormView::drawVectorType(QPainter *painter)
{
QPainterPath path;
- painter->translate(ctrlPoints.at(0) - QPointF(250,250));
+ painter->translate(m_controlPoints.at(0) - QPointF(250,250));
painter->scale(0.77, 0.77);
painter->translate(98.9154 + 30 , -217.691 - 20);
@@ -339,10 +336,10 @@ void XFormView::drawVectorType(QPainter *painter)
painter->setPen(Qt::NoPen);
path.moveTo(120, 470);
- path.lineTo(60+245, 470);
- path.lineTo(60+245, 470+350);
- path.lineTo(60, 470+350);
- path.lineTo(60, 470+80);
+ path.lineTo(60 + 245, 470);
+ path.lineTo(60 + 245, 470 + 350);
+ path.lineTo(60, 470 + 350);
+ path.lineTo(60, 470 + 80);
painter->setBrush(Qt::white);
painter->drawPath(path);
diff --git a/examples/widgets/painting/affine/xform.h b/examples/widgets/painting/affine/xform.h
index 1dce3b26da..0c28435057 100644
--- a/examples/widgets/painting/affine/xform.h
+++ b/examples/widgets/painting/affine/xform.h
@@ -88,7 +88,7 @@ public:
void mousePressEvent(QMouseEvent *e) override;
void resizeEvent(QResizeEvent *e) override;
- HoverPoints *hoverPoints() { return pts; }
+ HoverPoints *hoverPoints() { return m_hoverPoints; }
bool animation() const { return timer.isActive(); }
qreal shear() const { return m_shear; }
@@ -104,7 +104,7 @@ public:
public slots:
void setAnimation(bool animate);
- void updateCtrlPoints(const QPolygonF &);
+ void updateControlPoints(const QPolygonF &);
void changeRotation(int rotation);
void changeScale(int scale);
void changeShear(int shear);
@@ -130,12 +130,12 @@ protected:
#endif
private:
- QPolygonF ctrlPoints;
- HoverPoints *pts;
- qreal m_rotation;
- qreal m_scale;
- qreal m_shear;
- XFormType m_type;
+ QPolygonF m_controlPoints{{250, 250}, {350, 250}};
+ HoverPoints *m_hoverPoints;
+ qreal m_rotation = 0;
+ qreal m_scale = 1;
+ qreal m_shear = 0;
+ XFormType m_type = VectorType;
QPixmap m_pixmap;
QString m_text;
QBasicTimer timer;
diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt
index b36f44f8ba..74e05e2f5e 100644
--- a/examples/widgets/painting/basicdrawing/CMakeLists.txt
+++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from basicdrawing.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(basicdrawing LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index 0394e6a312..a859340074 100644
--- a/examples/widgets/painting/composition/CMakeLists.txt
+++ b/examples/widgets/painting/composition/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from composition.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(composition LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt
index e75da10aff..6ed7822902 100644
--- a/examples/widgets/painting/concentriccircles/CMakeLists.txt
+++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from concentriccircles.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(concentriccircles LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index 6ab43cc371..c95ae5f2f5 100644
--- a/examples/widgets/painting/deform/CMakeLists.txt
+++ b/examples/widgets/painting/deform/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from deform.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(deform LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp
index acf0191260..998b6a53a1 100644
--- a/examples/widgets/painting/deform/pathdeform.cpp
+++ b/examples/widgets/painting/deform/pathdeform.cpp
@@ -481,7 +481,7 @@ void PathDeformRenderer::timerEvent(QTimerEvent *e)
void PathDeformRenderer::mousePressEvent(QMouseEvent *e)
{
- if (m_show_doc) {
+ if (m_showDoc) {
setDescriptionEnabled(false);
return;
}
diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt
index 76bae96edd..58c610cf1c 100644
--- a/examples/widgets/painting/fontsampler/CMakeLists.txt
+++ b/examples/widgets/painting/fontsampler/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from fontsampler.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(fontsampler LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index bfc9ea888b..199389a47a 100644
--- a/examples/widgets/painting/gradients/CMakeLists.txt
+++ b/examples/widgets/painting/gradients/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from gradients.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(gradients LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt
index d90958d77b..902987ab64 100644
--- a/examples/widgets/painting/imagecomposition/CMakeLists.txt
+++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from imagecomposition.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(imagecomposition LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 4b4b36fa08..d26906e2f9 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from painterpaths.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(painterpaths LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt
index 54e61e1c32..2911a0f0e4 100644
--- a/examples/widgets/painting/pathstroke/CMakeLists.txt
+++ b/examples/widgets/painting/pathstroke/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from pathstroke.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(pathstroke LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/painting/shared/arthurwidgets.cpp b/examples/widgets/painting/shared/arthurwidgets.cpp
index 667246b79a..61e73c4a60 100644
--- a/examples/widgets/painting/shared/arthurwidgets.cpp
+++ b/examples/widgets/painting/shared/arthurwidgets.cpp
@@ -70,28 +70,15 @@
extern QPixmap cached(const QString &img);
ArthurFrame::ArthurFrame(QWidget *parent)
- : QWidget(parent)
- , m_prefer_image(false)
+ : QWidget(parent),
+ m_tile(QPixmap(128, 128))
{
-#if QT_CONFIG(opengl)
- m_glWindow = nullptr;
- m_glWidget = nullptr;
- m_use_opengl = false;
-#endif
- m_document = nullptr;
- m_show_doc = false;
-
- m_tile = QPixmap(128, 128);
m_tile.fill(Qt::white);
QPainter pt(&m_tile);
QColor color(230, 230, 230);
pt.fillRect(0, 0, 64, 64, color);
pt.fillRect(64, 64, 64, 64, color);
pt.end();
-
-// QPalette pal = palette();
-// pal.setBrush(backgroundRole(), m_tile);
-// setPalette(pal);
}
@@ -209,7 +196,7 @@ void ArthurFrame::paintEvent(QPaintEvent *e)
painter.restore();
painter.save();
- if (m_show_doc)
+ if (m_showDoc)
paintDescription(&painter);
painter.restore();
@@ -244,9 +231,9 @@ void ArthurFrame::resizeEvent(QResizeEvent *e)
void ArthurFrame::setDescriptionEnabled(bool enabled)
{
- if (m_show_doc != enabled) {
- m_show_doc = enabled;
- emit descriptionEnabledChanged(m_show_doc);
+ if (m_showDoc != enabled) {
+ m_showDoc = enabled;
+ emit descriptionEnabledChanged(m_showDoc);
update();
}
}
@@ -276,9 +263,8 @@ void ArthurFrame::paintDescription(QPainter *painter)
int pageWidth = qMax(width() - 100, 100);
int pageHeight = qMax(height() - 100, 100);
- if (pageWidth != m_document->pageSize().width()) {
+ if (pageWidth != m_document->pageSize().width())
m_document->setPageSize(QSize(pageWidth, pageHeight));
- }
QRect textRect(width() / 2 - pageWidth / 2,
height() / 2 - pageHeight / 2,
@@ -340,7 +326,7 @@ void ArthurFrame::showSource()
if (!f.open(QFile::ReadOnly))
contents = tr("Could not open file: '%1'").arg(m_sourceFileName);
else
- contents = f.readAll();
+ contents = QString::fromUtf8(f.readAll());
}
contents.replace(QLatin1Char('&'), QStringLiteral("&amp;"));
diff --git a/examples/widgets/painting/shared/arthurwidgets.h b/examples/widgets/painting/shared/arthurwidgets.h
index 73e1310c0e..69fee57a27 100644
--- a/examples/widgets/painting/shared/arthurwidgets.h
+++ b/examples/widgets/painting/shared/arthurwidgets.h
@@ -69,7 +69,6 @@ public:
ArthurFrame(QWidget *parent);
virtual void paint(QPainter *) {}
-
void paintDescription(QPainter *p);
void loadDescription(const QString &filename);
@@ -77,13 +76,13 @@ public:
void loadSourceFile(const QString &fileName);
- bool preferImage() const { return m_prefer_image; }
+ bool preferImage() const { return m_preferImage; }
#if QT_CONFIG(opengl)
QOpenGLWindow *glWindow() const { return m_glWindow; }
#endif
public slots:
- void setPreferImage(bool pi) { m_prefer_image = pi; }
+ void setPreferImage(bool pi) { m_preferImage = pi; }
void setDescriptionEnabled(bool enabled);
void showSource();
@@ -101,18 +100,17 @@ protected:
#if QT_CONFIG(opengl)
virtual void createGlWindow();
- QOpenGLWindow *m_glWindow;
- QWidget *m_glWidget;
- bool m_use_opengl;
+ QOpenGLWindow *m_glWindow = nullptr;
+ QWidget *m_glWidget = nullptr;
+ bool m_use_opengl = false;
#endif
QPixmap m_tile;
- bool m_show_doc;
- bool m_prefer_image;
- QTextDocument *m_document;
+ bool m_showDoc = false;
+ bool m_preferImage = false;
+ QTextDocument *m_document = nullptr;;
QString m_sourceFileName;
-
};
#endif
diff --git a/examples/widgets/painting/shared/hoverpoints.cpp b/examples/widgets/painting/shared/hoverpoints.cpp
index 417d593d04..ea59694f92 100644
--- a/examples/widgets/painting/shared/hoverpoints.cpp
+++ b/examples/widgets/painting/shared/hoverpoints.cpp
@@ -57,31 +57,18 @@
#include <QtOpenGL/QOpenGLWindow>
#endif
-#define printf
-
HoverPoints::HoverPoints(QWidget *widget, PointShape shape)
- : QObject(widget)
+ : QObject(widget),
+ m_widget(widget),
+ m_shape(shape)
{
- m_widget = widget;
widget->installEventFilter(this);
widget->setAttribute(Qt::WA_AcceptTouchEvents);
- m_connectionType = CurveConnection;
- m_sortType = NoSort;
- m_shape = shape;
- m_pointPen = QPen(QColor(255, 255, 255, 191), 1);
- m_connectionPen = QPen(QColor(255, 255, 255, 127), 2);
- m_pointBrush = QBrush(QColor(191, 191, 191, 127));
- m_pointSize = QSize(11, 11);
- m_currentIndex = -1;
- m_editable = true;
- m_enabled = true;
-
connect(this, &HoverPoints::pointsChanged,
m_widget, QOverload<>::of(&QWidget::update));
}
-
void HoverPoints::setEnabled(bool enabled)
{
if (m_enabled != enabled) {
@@ -90,191 +77,197 @@ void HoverPoints::setEnabled(bool enabled)
}
}
-
bool HoverPoints::eventFilter(QObject *object, QEvent *event)
{
- if (object == m_widget && m_enabled) {
- switch (event->type()) {
+ if (object != m_widget || !m_enabled)
+ return false;
- case QEvent::MouseButtonPress:
- {
- if (!m_fingerPointMapping.isEmpty())
- return true;
- QMouseEvent *me = (QMouseEvent *) event;
-
- QPointF clickPos = me->position().toPoint();
- int index = -1;
- for (int i=0; i<m_points.size(); ++i) {
- QPainterPath path;
- if (m_shape == CircleShape)
- path.addEllipse(pointBoundingRect(i));
- else
- path.addRect(pointBoundingRect(i));
-
- if (path.contains(clickPos)) {
- index = i;
- break;
- }
+ switch (event->type()) {
+ case QEvent::MouseButtonPress:
+ {
+ if (!m_fingerPointMapping.isEmpty())
+ return true;
+ auto *me = static_cast<const QMouseEvent *>(event);
+ QPointF clickPos = me->position().toPoint();
+ qsizetype index = -1;
+ for (qsizetype i = 0; i < m_points.size(); ++i) {
+ QPainterPath path;
+ const QRectF rect = pointBoundingRect(m_points.at(i));
+ if (m_shape == CircleShape)
+ path.addEllipse(rect);
+ else
+ path.addRect(rect);
+
+ if (path.contains(clickPos)) {
+ index = i;
+ break;
}
+ }
- if (me->button() == Qt::LeftButton) {
- if (index == -1) {
- if (!m_editable)
- return false;
- int pos = 0;
- // Insert sort for x or y
- if (m_sortType == XSort) {
- for (int i=0; i<m_points.size(); ++i)
- if (m_points.at(i).x() > clickPos.x()) {
- pos = i;
- break;
- }
- } else if (m_sortType == YSort) {
- for (int i=0; i<m_points.size(); ++i)
- if (m_points.at(i).y() > clickPos.y()) {
- pos = i;
- break;
- }
+ if (me->button() == Qt::LeftButton) {
+ if (index == -1) {
+ if (!m_editable)
+ return false;
+ qsizetype pos = 0;
+ // Insert sort for x or y
+ switch (m_sortType) {
+ case XSort:
+ for (qsizetype i = 0; i < m_points.size(); ++i) {
+ if (m_points.at(i).x() > clickPos.x()) {
+ pos = i;
+ break;
+ }
}
-
- m_points.insert(pos, clickPos);
- m_locks.insert(pos, 0);
- m_currentIndex = pos;
- firePointChange();
- } else {
- m_currentIndex = index;
- }
- return true;
-
- } else if (me->button() == Qt::RightButton) {
- if (index >= 0 && m_editable) {
- if (m_locks[index] == 0) {
- m_locks.remove(index);
- m_points.remove(index);
+ break;
+ case YSort:
+ for (qsizetype i = 0; i < m_points.size(); ++i) {
+ if (m_points.at(i).y() > clickPos.y()) {
+ pos = i;
+ break;
+ }
}
- firePointChange();
- return true;
+ break;
+ default:
+ break;
}
+
+ m_points.insert(pos, clickPos);
+ m_locks.insert(pos, 0);
+ m_currentIndex = pos;
+ firePointChange();
+ } else {
+ m_currentIndex = index;
}
+ return true;
+ } else if (me->button() == Qt::RightButton) {
+ if (index >= 0 && m_editable) {
+ if (m_locks[index] == 0) {
+ m_locks.remove(index);
+ m_points.remove(index);
+ }
+ firePointChange();
+ return true;
+ }
}
+ }
+ break;
+
+ case QEvent::MouseButtonRelease:
+ if (!m_fingerPointMapping.isEmpty())
+ return true;
+ m_currentIndex = -1;
break;
- case QEvent::MouseButtonRelease:
- if (!m_fingerPointMapping.isEmpty())
- return true;
- m_currentIndex = -1;
- break;
+ case QEvent::MouseMove:
+ if (!m_fingerPointMapping.isEmpty())
+ return true;
+ if (m_currentIndex >= 0) {
+ auto *me = static_cast<const QMouseEvent *>(event);
+ movePoint(m_currentIndex, me->position().toPoint());
+ }
+ break;
- case QEvent::MouseMove:
- if (!m_fingerPointMapping.isEmpty())
- return true;
- if (m_currentIndex >= 0)
- movePoint(m_currentIndex, ((QMouseEvent *)event)->position().toPoint());
- break;
- case QEvent::TouchBegin:
- case QEvent::TouchUpdate:
+ case QEvent::TouchBegin:
+ case QEvent::TouchUpdate:
+ {
+ auto *touchEvent = static_cast<const QTouchEvent*>(event);
+ const auto points = touchEvent->points();
+ const qreal pointSize = qMax(m_pointSize.width(), m_pointSize.height());
+ for (const auto &point : points) {
+ const int id = point.id();
+ switch (point.state()) {
+ case QEventPoint::Pressed:
{
- const QTouchEvent *const touchEvent = static_cast<const QTouchEvent*>(event);
- const auto points = touchEvent->points();
- const qreal pointSize = qMax(m_pointSize.width(), m_pointSize.height());
- for (const auto &point : points) {
- const int id = point.id();
- switch (point.state()) {
- case QEventPoint::Pressed:
- {
- // find the point, move it
- const auto mappedPoints = m_fingerPointMapping.values();
- QSet<int> activePoints = QSet<int>(mappedPoints.begin(), mappedPoints.end());
- int activePoint = -1;
- qreal distance = -1;
- const int pointsCount = m_points.size();
- const int activePointCount = activePoints.size();
- if (pointsCount == 2 && activePointCount == 1) { // only two points
- activePoint = activePoints.contains(0) ? 1 : 0;
- } else {
- for (int i=0; i<pointsCount; ++i) {
- if (activePoints.contains(i))
- continue;
-
- qreal d = QLineF(point.position(), m_points.at(i)).length();
- if ((distance < 0 && d < 12 * pointSize) || d < distance) {
- distance = d;
- activePoint = i;
- }
-
- }
- }
- if (activePoint != -1) {
- m_fingerPointMapping.insert(point.id(), activePoint);
- movePoint(activePoint, point.position());
- }
- }
- break;
- case QEventPoint::Released:
- {
- // move the point and release
- QHash<int,int>::iterator it = m_fingerPointMapping.find(id);
- movePoint(it.value(), point.position());
- m_fingerPointMapping.erase(it);
- }
- break;
- case QEventPoint::Updated:
- {
- // move the point
- const int pointIdx = m_fingerPointMapping.value(id, -1);
- if (pointIdx >= 0) // do we track this point?
- movePoint(pointIdx, point.position());
+ // find the point, move it
+ const auto mappedPoints = m_fingerPointMapping.values();
+ QSet<qsizetype> activePoints(mappedPoints.begin(), mappedPoints.end());
+ qsizetype activePoint = -1;
+ qreal distance = -1;
+ const qsizetype pointsCount = m_points.size();
+ const qsizetype activePointCount = activePoints.size();
+ if (pointsCount == 2 && activePointCount == 1) { // only two points
+ activePoint = activePoints.contains(0) ? 1 : 0;
+ } else {
+ for (qsizetype i = 0; i < pointsCount; ++i) {
+ if (activePoints.contains(i))
+ continue;
+
+ qreal d = QLineF(point.position(), m_points.at(i)).length();
+ if ((distance < 0 && d < 12 * pointSize) || d < distance) {
+ distance = d;
+ activePoint = i;
}
- break;
- default:
- break;
+
}
}
- if (m_fingerPointMapping.isEmpty()) {
- event->ignore();
- return false;
- } else {
- return true;
+ if (activePoint != -1) {
+ m_fingerPointMapping.insert(point.id(), activePoint);
+ movePoint(activePoint, point.position());
}
}
break;
- case QEvent::TouchEnd:
- if (m_fingerPointMapping.isEmpty()) {
- event->ignore();
- return false;
+ case QEventPoint::Released:
+ {
+ // move the point and release
+ const auto it = m_fingerPointMapping.find(id);
+ movePoint(it.value(), point.position());
+ m_fingerPointMapping.erase(it);
}
- return true;
break;
-
- case QEvent::Resize:
- {
- QResizeEvent *e = (QResizeEvent *) event;
- if (e->oldSize().width() == 0 || e->oldSize().height() == 0)
- break;
- qreal stretch_x = e->size().width() / qreal(e->oldSize().width());
- qreal stretch_y = e->size().height() / qreal(e->oldSize().height());
- for (int i=0; i<m_points.size(); ++i) {
- QPointF p = m_points[i];
- movePoint(i, QPointF(p.x() * stretch_x, p.y() * stretch_y), false);
+ case QEventPoint::Updated:
+ {
+ // move the point
+ const qsizetype pointIdx = m_fingerPointMapping.value(id, -1);
+ if (pointIdx >= 0) // do we track this point?
+ movePoint(pointIdx, point.position());
}
-
- firePointChange();
break;
+ default:
+ break;
+ }
}
-
- case QEvent::Paint:
- {
- QWidget *that_widget = m_widget;
- m_widget = nullptr;
- QCoreApplication::sendEvent(object, event);
- m_widget = that_widget;
- paintPoints();
- return true;
+ if (m_fingerPointMapping.isEmpty()) {
+ event->ignore();
+ return false;
+ }
+ return true;
+ }
+ case QEvent::TouchEnd:
+ if (m_fingerPointMapping.isEmpty()) {
+ event->ignore();
+ return false;
}
- default:
+ return true;
+
+ case QEvent::Resize:
+ {
+ auto *e = static_cast<const QResizeEvent *>(event);
+ if (e->oldSize().width() <= 0 || e->oldSize().height() <= 0)
break;
+ qreal stretch_x = e->size().width() / qreal(e->oldSize().width());
+ qreal stretch_y = e->size().height() / qreal(e->oldSize().height());
+ for (qsizetype i = 0; i < m_points.size(); ++i) {
+ QPointF p = m_points.at(i);
+ movePoint(i, QPointF(p.x() * stretch_x, p.y() * stretch_y), false);
}
+
+ firePointChange();
+ break;
+ }
+
+ case QEvent::Paint:
+ {
+ QWidget *that_widget = m_widget;
+ m_widget = nullptr;
+ QCoreApplication::sendEvent(object, event);
+ m_widget = that_widget;
+ paintPoints();
+ return true;
+ }
+
+ default:
+ break;
}
return false;
@@ -304,8 +297,8 @@ void HoverPoints::paintPoints()
if (m_connectionType == CurveConnection) {
QPainterPath path;
path.moveTo(m_points.at(0));
- for (int i=1; i<m_points.size(); ++i) {
- QPointF p1 = m_points.at(i-1);
+ for (qsizetype i = 1; i < m_points.size(); ++i) {
+ QPointF p1 = m_points.at(i - 1);
QPointF p2 = m_points.at(i);
qreal distance = p2.x() - p1.x();
@@ -322,8 +315,8 @@ void HoverPoints::paintPoints()
p.setPen(m_pointPen);
p.setBrush(m_pointBrush);
- for (int i=0; i<m_points.size(); ++i) {
- QRectF bounds = pointBoundingRect(i);
+ for (const auto &point : qAsConst(m_points)) {
+ QRectF bounds = pointBoundingRect(point);
if (m_shape == CircleShape)
p.drawEllipse(bounds);
else
@@ -354,32 +347,28 @@ void HoverPoints::setPoints(const QPolygonF &points)
if (points.size() != m_points.size())
m_fingerPointMapping.clear();
m_points.clear();
- for (int i=0; i<points.size(); ++i)
+ for (qsizetype i = 0; i < points.size(); ++i)
m_points << bound_point(points.at(i), boundingRect(), 0);
m_locks.clear();
if (m_points.size() > 0) {
m_locks.resize(m_points.size());
-
m_locks.fill(0);
}
}
-
-void HoverPoints::movePoint(int index, const QPointF &point, bool emitUpdate)
+void HoverPoints::movePoint(qsizetype index, const QPointF &point, bool emitUpdate)
{
m_points[index] = bound_point(point, boundingRect(), m_locks.at(index));
if (emitUpdate)
firePointChange();
}
-
inline static bool x_less_than(const QPointF &p1, const QPointF &p2)
{
return p1.x() < p2.x();
}
-
inline static bool y_less_than(const QPointF &p1, const QPointF &p2)
{
return p1.y() < p2.y();
@@ -387,14 +376,11 @@ inline static bool y_less_than(const QPointF &p1, const QPointF &p2)
void HoverPoints::firePointChange()
{
-// printf("HoverPoints::firePointChange(), current=%d\n", m_currentIndex);
-
if (m_sortType != NoSort) {
QPointF oldCurrent;
- if (m_currentIndex != -1) {
+ if (m_currentIndex != -1)
oldCurrent = m_points[m_currentIndex];
- }
if (m_sortType == XSort)
std::sort(m_points.begin(), m_points.end(), x_less_than);
@@ -403,22 +389,14 @@ void HoverPoints::firePointChange()
// Compensate for changed order...
if (m_currentIndex != -1) {
- for (int i=0; i<m_points.size(); ++i) {
+ for (qsizetype i = 0; i < m_points.size(); ++i) {
if (m_points[i] == oldCurrent) {
m_currentIndex = i;
break;
}
}
}
-
-// printf(" - firePointChange(), current=%d\n", m_currentIndex);
-
}
-// for (int i=0; i<m_points.size(); ++i) {
-// printf(" - point(%2d)=[%.2f, %.2f], lock=%d\n",
-// i, m_points.at(i).x(), m_points.at(i).y(), m_locks.at(i));
-// }
-
emit pointsChanged(m_points);
}
diff --git a/examples/widgets/painting/shared/hoverpoints.h b/examples/widgets/painting/shared/hoverpoints.h
index 3c6f356e1b..8b341197d2 100644
--- a/examples/widgets/painting/shared/hoverpoints.h
+++ b/examples/widgets/painting/shared/hoverpoints.h
@@ -124,35 +124,33 @@ public:
void firePointChange();
private:
- inline QRectF pointBoundingRect(int i) const;
- void movePoint(int i, const QPointF &newPos, bool emitChange = true);
+ inline QRectF pointBoundingRect(const QPointF &p) const;
+ void movePoint(qsizetype i, const QPointF &newPos, bool emitChange = true);
QWidget *m_widget;
QPolygonF m_points;
QRectF m_bounds;
PointShape m_shape;
- SortType m_sortType;
- ConnectionType m_connectionType;
+ SortType m_sortType = NoSort;
+ ConnectionType m_connectionType = CurveConnection;
QList<uint> m_locks;
- QSizeF m_pointSize;
- int m_currentIndex;
- bool m_editable;
- bool m_enabled;
+ QSizeF m_pointSize{11, 11};
+ qsizetype m_currentIndex= -1;
+ bool m_editable = true;
+ bool m_enabled = true;
- QHash<int, int> m_fingerPointMapping;
+ QHash<int, qsizetype> m_fingerPointMapping;
- QPen m_pointPen;
- QBrush m_pointBrush;
- QPen m_connectionPen;
+ QPen m_pointPen{QColor(255, 255, 255, 191), 1};
+ QBrush m_pointBrush{QColor(191, 191, 191, 127)};
+ QPen m_connectionPen{QColor(255, 255, 255, 127), 2};
};
-
-inline QRectF HoverPoints::pointBoundingRect(int i) const
+inline QRectF HoverPoints::pointBoundingRect(const QPointF &p) const
{
- QPointF p = m_points.at(i);
qreal w = m_pointSize.width();
qreal h = m_pointSize.height();
qreal x = p.x() - w / 2;
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index c0ca191c8a..c756f77d61 100644
--- a/examples/widgets/painting/transformations/CMakeLists.txt
+++ b/examples/widgets/painting/transformations/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from transformations.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(transformations LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/richtext/calendar/CMakeLists.txt b/examples/widgets/richtext/calendar/CMakeLists.txt
index d8ef569f5f..5846020183 100644
--- a/examples/widgets/richtext/calendar/CMakeLists.txt
+++ b/examples/widgets/richtext/calendar/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from calendar.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(calendar LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt
index d1538778cc..6903348223 100644
--- a/examples/widgets/richtext/orderform/CMakeLists.txt
+++ b/examples/widgets/richtext/orderform/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from orderform.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(orderform LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
index 5bdc9f7981..3e288b1a25 100644
--- a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
+++ b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from syntaxhighlighter.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(syntaxhighlighter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt
index 8940fd5abf..a94f50d988 100644
--- a/examples/widgets/richtext/textedit/CMakeLists.txt
+++ b/examples/widgets/richtext/textedit/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from textedit.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(textedit LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/richtext/textedit/example.html b/examples/widgets/richtext/textedit/example.html
index 99090a697f..ca3dce23cc 100644
--- a/examples/widgets/richtext/textedit/example.html
+++ b/examples/widgets/richtext/textedit/example.html
@@ -1,6 +1,8 @@
-<html><head><meta name="qrichtext" content="1" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>QTextEdit Example</title><style type="text/css">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><title>QTextEdit Example</title><style type="text/css">
p, li { white-space: pre-wrap; }
-</style></head><body style=" font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+hr { height: 1px; border-width: 0; }
+</style></head><body style=" font-family:'Helvetica'; font-size:9pt; font-weight:400; font-style:normal;">
<h1 align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:20pt; font-weight:600;">QTextEdit</span></h1>
<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.</span></p>
<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;">If you are viewing this document in the <span style=" font-style:italic;">textedit</span> example, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment. </p>
@@ -27,6 +29,9 @@ p, li { white-space: pre-wrap; }
<h2 style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Images</span></h2>
<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">Inline images are treated like ordinary ranges of characters in the text editor, so they flow with the surrounding text. Images can also be selected in the same way as text, making it easy to cut, copy, and paste them. </span></p>
<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><img src=":/images/logo32.png" /><span style=" font-style:italic;"> Try to select this image by clicking and dragging over it with the mouse, or use the text cursor to select it by holding down Shift and using the arrow keys. You can then cut or copy it, and paste it into different parts of this document.</span></p>
+<h2 align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:16pt; font-weight:600;">Horizontal Rule</span></h2>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Here is an example:</p>
+<hr width="50%" style=" background-color:green;"/>
<h2 align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"><span style=" font-size:16pt; font-weight:600;">Tables</span></h2>
<p align="justify" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:16pt; font-weight:600;"><span style=" font-size:11pt; font-weight:400;">QTextEdit can arrange and format tables, supporting features such as row and column spans, text formatting within cells, and size constraints for columns. </span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:11pt;"></p>
diff --git a/examples/widgets/scroller/graphicsview/CMakeLists.txt b/examples/widgets/scroller/graphicsview/CMakeLists.txt
index cf1349f110..5efa7f94ca 100644
--- a/examples/widgets/scroller/graphicsview/CMakeLists.txt
+++ b/examples/widgets/scroller/graphicsview/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from graphicsview.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(graphicsview LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt
index a04d25f045..e03092543e 100644
--- a/examples/widgets/tools/completer/CMakeLists.txt
+++ b/examples/widgets/tools/completer/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from completer.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(completer LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt
index 13dd1123eb..c725f85336 100644
--- a/examples/widgets/tools/customcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/customcompleter/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from customcompleter.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(customcompleter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/echoplugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/CMakeLists.txt
index 380cfcae8e..6e32a4de09 100644
--- a/examples/widgets/tools/echoplugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/CMakeLists.txt
@@ -1,4 +1,15 @@
-# Generated from echoplugin.pro.
+cmake_minimum_required(VERSION 3.16)
+project(plugandpaint LANGUAGES CXX)
-qt_internal_add_example(echowindow)
-qt_internal_add_example(plugin)
+find_package(Qt6 COMPONENTS Core Gui Widgets)
+
+set(CMAKE_AUTOMOC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin")
+
+add_subdirectory(plugin)
+add_subdirectory(echowindow)
diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
index 3814fb235d..3fcbe17172 100644
--- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
@@ -1,40 +1,25 @@
-# Generated from echowindow.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(echoplugin 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}/widgets/tools/echoplugin")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-
-qt_add_executable(echopluginwindow # special case: renamed target
+qt_add_executable(echopluginwindow
echointerface.h
echowindow.cpp echowindow.h
main.cpp
)
-set_target_properties(echopluginwindow PROPERTIES # special case
+set_target_properties(echopluginwindow PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
-target_link_libraries(echopluginwindow PUBLIC # special case
+target_link_libraries(echopluginwindow PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
)
-install(TARGETS echopluginwindow # special case: renamed target
+if(NOT QT6_IS_SHARED_LIBS_BUILD)
+ target_link_libraries(echopluginwindow PRIVATE
+ echoplugin
+ )
+endif()
+
+install(TARGETS echopluginwindow
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
index 3e605cd2c9..fb727aa1d7 100644
--- a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
@@ -1,31 +1,11 @@
-# Generated from plugin.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(echoplugin 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}/widgets/tools/echoplugin/plugins")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-
-qt_add_plugin(echoplugin)
+qt_add_plugin(echoplugin
+ CLASS_NAME EchoPlugin
+)
target_sources(echoplugin PRIVATE
echoplugin.cpp echoplugin.h
)
set_target_properties(echoplugin PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+ LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/echowindow"
)
target_include_directories(echoplugin PUBLIC
../echowindow
@@ -39,6 +19,5 @@ target_link_libraries(echoplugin PUBLIC
install(TARGETS echoplugin
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt
index 7579853312..4ff9402dec 100644
--- a/examples/widgets/tools/i18n/CMakeLists.txt
+++ b/examples/widgets/tools/i18n/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from i18n.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(i18n LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/plugandpaint/CMakeLists.txt b/examples/widgets/tools/plugandpaint/CMakeLists.txt
index 3c997faf21..e681812dad 100644
--- a/examples/widgets/tools/plugandpaint/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/CMakeLists.txt
@@ -1,6 +1,4 @@
-# Generated from plugandpaint.pro.
-# special case skip regeneration
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(plugandpaint LANGUAGES CXX)
find_package(Qt6 COMPONENTS Core Gui Widgets)
diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
index 14cdaeb822..3e46331f81 100644
--- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
@@ -1,6 +1,3 @@
-# Generated from app.pro.
-# special case skip regeneration
-
qt_add_executable(plugandpaint
interfaces.h
main.cpp
@@ -12,11 +9,17 @@ set_target_properties(plugandpaint PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
-target_link_libraries(plugandpaint PUBLIC
+target_link_libraries(plugandpaint PRIVATE
Qt::Widgets
pnp_basictools
)
+if(NOT QT6_IS_SHARED_LIBS_BUILD)
+ target_link_libraries(plugandpaint PRIVATE
+ pnp_extrafilters
+ )
+endif()
+
install(TARGETS plugandpaint
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/plugandpaint/plugins/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/CMakeLists.txt
index 1e63da97ca..9a2d66d99e 100644
--- a/examples/widgets/tools/plugandpaint/plugins/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/CMakeLists.txt
@@ -1,4 +1,2 @@
-# Generated from plugins.pro.
-
add_subdirectory(basictools)
add_subdirectory(extrafilters)
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
index c66f83ce62..0056205319 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
@@ -1,19 +1,15 @@
-# Generated from basictools.pro.
-# special case skip regeneration
-
-qt_add_plugin(pnp_basictools STATIC)
+qt_add_plugin(pnp_basictools
+ STATIC
+ CLASS_NAME BasicToolsPlugin
+)
target_sources(pnp_basictools PRIVATE
basictoolsplugin.cpp basictoolsplugin.h
)
-set_target_properties(pnp_basictools PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
target_include_directories(pnp_basictools PUBLIC
../../app
)
-target_link_libraries(pnp_basictools PUBLIC
+target_link_libraries(pnp_basictools PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
index 9227dd0537..2332f84399 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
@@ -1,19 +1,17 @@
-# Generated from extrafilters.pro.
-# special case skip regeneration
-
-qt_add_plugin(pnp_extrafilters)
+qt_add_plugin(pnp_extrafilters
+ CLASS_NAME ExtraFiltersPlugin
+)
target_sources(pnp_extrafilters PRIVATE
extrafiltersplugin.cpp extrafiltersplugin.h
)
set_target_properties(pnp_extrafilters PROPERTIES
- MACOSX_BUNDLE TRUE
LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/app"
)
target_include_directories(pnp_extrafilters PUBLIC
../../app
)
-target_link_libraries(pnp_extrafilters PUBLIC
+target_link_libraries(pnp_extrafilters PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt
index c0dbf8e24e..26865e5179 100644
--- a/examples/widgets/tools/regularexpression/CMakeLists.txt
+++ b/examples/widgets/tools/regularexpression/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from regularexpression.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(regularexpression LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt
index b875192bbb..fc050b5f76 100644
--- a/examples/widgets/tools/settingseditor/CMakeLists.txt
+++ b/examples/widgets/tools/settingseditor/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from settingseditor.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(settingseditor LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt
index af10d38700..33412f5306 100644
--- a/examples/widgets/tools/styleplugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/CMakeLists.txt
@@ -1,19 +1,15 @@
-# Generated from styleplugin.pro.
-
-# special case begin
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(styleplugin LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
+find_package(Qt6 COMPONENTS Widgets)
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
-find_package(Qt6 COMPONENTS Widgets)
-# special case end
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin")
add_subdirectory(stylewindow)
add_subdirectory(plugin)
diff --git a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
index d3899bc0f4..30a06231c1 100644
--- a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
@@ -1,34 +1,14 @@
-# Generated from plugin.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(simplestyleplugin 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}/widgets/tools/styleplugin/styles")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-
-qt_add_plugin(simplestyleplugin)
+qt_add_plugin(simplestyleplugin
+ CLASS_NAME SimpleStylePlugin
+)
target_sources(simplestyleplugin PRIVATE
simplestyle.cpp simplestyle.h
simplestyleplugin.cpp simplestyleplugin.h
)
set_target_properties(simplestyleplugin PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
+ LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/stylewindow/styles"
)
-target_link_libraries(simplestyleplugin PUBLIC
+target_link_libraries(simplestyleplugin PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
@@ -36,6 +16,5 @@ target_link_libraries(simplestyleplugin PUBLIC
install(TARGETS simplestyleplugin
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
index 5d692b0564..aab63afbf2 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
@@ -1,24 +1,3 @@
-# Generated from stylewindow.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(styleplugin 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}/widgets/tools/styleplugin")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Widgets)
-
qt_add_executable(styleplugin
main.cpp
stylewindow.cpp stylewindow.h
@@ -27,11 +6,16 @@ set_target_properties(styleplugin PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
-target_link_libraries(styleplugin PUBLIC
+target_link_libraries(styleplugin PRIVATE
Qt::Core
Qt::Gui
Qt::Widgets
)
+if(NOT QT6_IS_SHARED_LIBS_BUILD)
+ target_link_libraries(styleplugin PRIVATE
+ simplestyleplugin
+ )
+endif()
install(TARGETS styleplugin
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
index 34d1d996ed..92ec0f7944 100644
--- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from treemodelcompleter.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(treemodelcompleter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt
index 8156e12bcd..94e63a665c 100644
--- a/examples/widgets/tools/undo/CMakeLists.txt
+++ b/examples/widgets/tools/undo/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from undo.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(undo LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt
index 9286f83ddb..a315ab46d6 100644
--- a/examples/widgets/tools/undoframework/CMakeLists.txt
+++ b/examples/widgets/tools/undoframework/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from undoframework.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(undoframework LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/touch/dials/CMakeLists.txt b/examples/widgets/touch/dials/CMakeLists.txt
index 81a4878c80..dcfb3a9194 100644
--- a/examples/widgets/touch/dials/CMakeLists.txt
+++ b/examples/widgets/touch/dials/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from dials.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dials LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt
index 9f677d7467..12e96173cf 100644
--- a/examples/widgets/touch/fingerpaint/CMakeLists.txt
+++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from fingerpaint.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(fingerpaint LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/touch/knobs/CMakeLists.txt b/examples/widgets/touch/knobs/CMakeLists.txt
index 08dfb0a78a..a3b118a7ef 100644
--- a/examples/widgets/touch/knobs/CMakeLists.txt
+++ b/examples/widgets/touch/knobs/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from knobs.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(knobs LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/touch/pinchzoom/CMakeLists.txt b/examples/widgets/touch/pinchzoom/CMakeLists.txt
index 6288301683..6efbf831ec 100644
--- a/examples/widgets/touch/pinchzoom/CMakeLists.txt
+++ b/examples/widgets/touch/pinchzoom/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from pinchzoom.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(pinchzoom LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
index 264b22e259..66d07422a7 100644
--- a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part1.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
index 8e5e446802..0af325d2eb 100644
--- a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part2.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part2 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
index 3cf1f5c49f..bf250b92ed 100644
--- a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part3.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part3 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
index 0497353753..4bba55d0f4 100644
--- a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part4.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part4 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
index d3ac961064..646a404c64 100644
--- a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part5.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part5 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
index a3dd87619a..2300e6fa58 100644
--- a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part6.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part6 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
index 88b5ca3a1e..93c51ebed9 100644
--- a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part7.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(part7 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
index 13ed19067b..0e73ada7ba 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part1.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(getting_started_part1 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
index 4f72a9ede8..0b828abc0f 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part2.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(getting_started_part2 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
index d8a72abd59..7b8506399a 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part3.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(getting_started_part3 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
index 3e42635ae4..f28bc9f3fa 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part4.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(getting_started_part4 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
index c92f60d535..95e0f1db43 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from part5.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(getting_started_part5 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
index a9aa027352..a87df63fd9 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 1_readonly.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_readonly LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
index d17ac4f413..20c3181cf5 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 2_formatting.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_formatting LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
index 02305a8140..fa4397528b 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 3_changingmodel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_changingmodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
index 1ff44691a1..4bf8f5fd0b 100644
--- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 4_headers.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_headers LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
index bcb0f06714..388491db8b 100644
--- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 5_edit.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_edit LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
index d020349fa5..1759eef471 100644
--- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 6_treeview.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_tree LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
index 776b8d7688..35c30f3efc 100644
--- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from 7_selections.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mv_selections LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt
index 267c3583b7..3c1fea3e6b 100644
--- a/examples/widgets/tutorials/notepad/CMakeLists.txt
+++ b/examples/widgets/tutorials/notepad/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from notepad.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(notepad LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
index c5852850ae..f51514818b 100644
--- a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from childwidget.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(childwidget LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
index b7aca1b946..3bd5d52c51 100644
--- a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from nestedlayouts.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(nestedlayouts LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
index 35296c8621..893c5c72ee 100644
--- a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from toplevel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(toplevel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
index 71f848d387..95bf0f2f50 100644
--- a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from windowlayout.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(windowlayout LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/analogclock/CMakeLists.txt b/examples/widgets/widgets/analogclock/CMakeLists.txt
index 50dc07919c..624b041c32 100644
--- a/examples/widgets/widgets/analogclock/CMakeLists.txt
+++ b/examples/widgets/widgets/analogclock/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from analogclock.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(analogclock LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/calculator/CMakeLists.txt b/examples/widgets/widgets/calculator/CMakeLists.txt
index 5f961e350d..8449ba5c57 100644
--- a/examples/widgets/widgets/calculator/CMakeLists.txt
+++ b/examples/widgets/widgets/calculator/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from calculator.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(calculator LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/calendarwidget/CMakeLists.txt b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
index 74c342ab73..f43b1590d0 100644
--- a/examples/widgets/widgets/calendarwidget/CMakeLists.txt
+++ b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from calendarwidget.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(calendarwidget LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/charactermap/CMakeLists.txt b/examples/widgets/widgets/charactermap/CMakeLists.txt
index 07791589c1..33980ce3b5 100644
--- a/examples/widgets/widgets/charactermap/CMakeLists.txt
+++ b/examples/widgets/widgets/charactermap/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from charactermap.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(charactermap LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/codeeditor/CMakeLists.txt b/examples/widgets/widgets/codeeditor/CMakeLists.txt
index 58665eca3c..9bed15f47b 100644
--- a/examples/widgets/widgets/codeeditor/CMakeLists.txt
+++ b/examples/widgets/widgets/codeeditor/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from codeeditor.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(codeeditor LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/digitalclock/CMakeLists.txt b/examples/widgets/widgets/digitalclock/CMakeLists.txt
index 5cff6b456f..8a71a18b9e 100644
--- a/examples/widgets/widgets/digitalclock/CMakeLists.txt
+++ b/examples/widgets/widgets/digitalclock/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from digitalclock.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(digitalclock LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/elidedlabel/CMakeLists.txt b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
index 338a6cfefe..cca1e68c88 100644
--- a/examples/widgets/widgets/elidedlabel/CMakeLists.txt
+++ b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from elidedlabel.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(elidedlabel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/groupbox/CMakeLists.txt b/examples/widgets/widgets/groupbox/CMakeLists.txt
index 74f2fe037f..48d9395b67 100644
--- a/examples/widgets/widgets/groupbox/CMakeLists.txt
+++ b/examples/widgets/widgets/groupbox/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from groupbox.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(groupbox LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/icons/CMakeLists.txt b/examples/widgets/widgets/icons/CMakeLists.txt
index e14272e777..9edba2b6c7 100644
--- a/examples/widgets/widgets/icons/CMakeLists.txt
+++ b/examples/widgets/widgets/icons/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from icons.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(icons LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt
index a52bc5fb34..bc3877f506 100644
--- a/examples/widgets/widgets/imageviewer/CMakeLists.txt
+++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from imageviewer.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(imageviewer LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/lineedits/CMakeLists.txt b/examples/widgets/widgets/lineedits/CMakeLists.txt
index 9e219e1038..4831f106a2 100644
--- a/examples/widgets/widgets/lineedits/CMakeLists.txt
+++ b/examples/widgets/widgets/lineedits/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from lineedits.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(lineedits LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/mousebuttons/CMakeLists.txt b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
index 6a8a365d33..d12c2be7a1 100644
--- a/examples/widgets/widgets/mousebuttons/CMakeLists.txt
+++ b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from mousebuttons.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(mousebuttons LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/movie/CMakeLists.txt b/examples/widgets/widgets/movie/CMakeLists.txt
index a990a98f48..9acc336a82 100644
--- a/examples/widgets/widgets/movie/CMakeLists.txt
+++ b/examples/widgets/widgets/movie/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from movie.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(movie LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt
index dc7f0f56bb..b70e7063ec 100644
--- a/examples/widgets/widgets/scribble/CMakeLists.txt
+++ b/examples/widgets/widgets/scribble/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from scribble.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(scribble LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/shapedclock/CMakeLists.txt b/examples/widgets/widgets/shapedclock/CMakeLists.txt
index de91c6410c..4741642db6 100644
--- a/examples/widgets/widgets/shapedclock/CMakeLists.txt
+++ b/examples/widgets/widgets/shapedclock/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from shapedclock.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(shapedclock LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/sliders/CMakeLists.txt b/examples/widgets/widgets/sliders/CMakeLists.txt
index 07dd0c0326..59b0de9c44 100644
--- a/examples/widgets/widgets/sliders/CMakeLists.txt
+++ b/examples/widgets/widgets/sliders/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from sliders.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(sliders LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/spinboxes/CMakeLists.txt b/examples/widgets/widgets/spinboxes/CMakeLists.txt
index ade330faf2..3c7215f573 100644
--- a/examples/widgets/widgets/spinboxes/CMakeLists.txt
+++ b/examples/widgets/widgets/spinboxes/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from spinboxes.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(spinboxes LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/styles/CMakeLists.txt b/examples/widgets/widgets/styles/CMakeLists.txt
index c847af915c..082104fc08 100644
--- a/examples/widgets/widgets/styles/CMakeLists.txt
+++ b/examples/widgets/widgets/styles/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from styles.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(styles LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/stylesheet/CMakeLists.txt b/examples/widgets/widgets/stylesheet/CMakeLists.txt
index ccfb15f68c..c88c7a8c8c 100644
--- a/examples/widgets/widgets/stylesheet/CMakeLists.txt
+++ b/examples/widgets/widgets/stylesheet/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from stylesheet.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(stylesheet LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/tablet/CMakeLists.txt b/examples/widgets/widgets/tablet/CMakeLists.txt
index c411cc4fef..04701f98d6 100644
--- a/examples/widgets/widgets/tablet/CMakeLists.txt
+++ b/examples/widgets/widgets/tablet/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from tablet.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qttablet LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/tetrix/CMakeLists.txt b/examples/widgets/widgets/tetrix/CMakeLists.txt
index 58237e2962..85ec447334 100644
--- a/examples/widgets/widgets/tetrix/CMakeLists.txt
+++ b/examples/widgets/widgets/tetrix/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from tetrix.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(tetrix LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/tetrix/tetrixwindow.cpp b/examples/widgets/widgets/tetrix/tetrixwindow.cpp
index 5aa5c3f615..c2e5129522 100644
--- a/examples/widgets/widgets/tetrix/tetrixwindow.cpp
+++ b/examples/widgets/widgets/tetrix/tetrixwindow.cpp
@@ -89,21 +89,12 @@ TetrixWindow::TetrixWindow(QWidget *parent)
//! [4] //! [5]
connect(quitButton , &QPushButton::clicked, qApp, &QCoreApplication::quit);
connect(pauseButton, &QPushButton::clicked, board, &TetrixBoard::pause);
-#if __cplusplus >= 201402L
connect(board, &TetrixBoard::scoreChanged,
scoreLcd, qOverload<int>(&QLCDNumber::display));
connect(board, &TetrixBoard::levelChanged,
levelLcd, qOverload<int>(&QLCDNumber::display));
connect(board, &TetrixBoard::linesRemovedChanged,
linesLcd, qOverload<int>(&QLCDNumber::display));
-#else
- connect(board, &TetrixBoard::scoreChanged,
- scoreLcd, QOverload<int>::of(&QLCDNumber::display));
- connect(board, &TetrixBoard::levelChanged,
- levelLcd, QOverload<int>::of(&QLCDNumber::display));
- connect(board, &TetrixBoard::linesRemovedChanged,
- linesLcd, QOverload<int>::of(&QLCDNumber::display));
-#endif
//! [5]
//! [6]
diff --git a/examples/widgets/widgets/tooltips/CMakeLists.txt b/examples/widgets/widgets/tooltips/CMakeLists.txt
index bde6e4fc27..f6885559f0 100644
--- a/examples/widgets/widgets/tooltips/CMakeLists.txt
+++ b/examples/widgets/widgets/tooltips/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from tooltips.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(tooltips LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/validators/CMakeLists.txt b/examples/widgets/widgets/validators/CMakeLists.txt
index d5ea9b833e..77ca8a4789 100644
--- a/examples/widgets/widgets/validators/CMakeLists.txt
+++ b/examples/widgets/widgets/validators/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from validators.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(validators LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/wiggly/CMakeLists.txt b/examples/widgets/widgets/wiggly/CMakeLists.txt
index daf816d46e..0013dae924 100644
--- a/examples/widgets/widgets/wiggly/CMakeLists.txt
+++ b/examples/widgets/widgets/wiggly/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from wiggly.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(wiggly LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/widgets/windowflags/CMakeLists.txt b/examples/widgets/widgets/windowflags/CMakeLists.txt
index 93ab0d9dbf..5eb9503cd9 100644
--- a/examples/widgets/widgets/windowflags/CMakeLists.txt
+++ b/examples/widgets/widgets/windowflags/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from windowflags.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(windowflags LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/widgets/windowcontainer/CMakeLists.txt b/examples/widgets/windowcontainer/CMakeLists.txt
index 8348694666..9b85cadd72 100644
--- a/examples/widgets/windowcontainer/CMakeLists.txt
+++ b/examples/widgets/windowcontainer/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from windowcontainer.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(windowcontainer LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)