diff options
Diffstat (limited to 'examples/widgets/painting/transformations')
-rw-r--r-- | examples/widgets/painting/transformations/CMakeLists.txt | 33 | ||||
-rw-r--r-- | examples/widgets/painting/transformations/window.cpp | 4 |
2 files changed, 35 insertions, 2 deletions
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt new file mode 100644 index 0000000000..b5725967ea --- /dev/null +++ b/examples/widgets/painting/transformations/CMakeLists.txt @@ -0,0 +1,33 @@ +# Generated from transformations.pro. + +cmake_minimum_required(VERSION 3.14) +project(transformations LANGUAGES CXX) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(INSTALL_EXAMPLEDIR "examples/widgets/painting/transformations") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(transformations + main.cpp + renderarea.cpp renderarea.h + window.cpp window.h +) +target_link_libraries(transformations PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + +install(TARGETS transformations + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/painting/transformations/window.cpp b/examples/widgets/painting/transformations/window.cpp index 8261c4e12e..a07e4dd5d1 100644 --- a/examples/widgets/painting/transformations/window.cpp +++ b/examples/widgets/painting/transformations/window.cpp @@ -79,7 +79,7 @@ Window::Window() operationComboBoxes[i]->addItem(tr("Scale to 75%")); operationComboBoxes[i]->addItem(tr("Translate by (50, 50)")); - connect(operationComboBoxes[i], QOverload<int>::of(&QComboBox::activated), + connect(operationComboBoxes[i], &QComboBox::activated, this, &Window::operationChanged); layout->addWidget(transformedRenderAreas[i], 0, i + 1); @@ -159,7 +159,7 @@ void Window::setupShapes() shapes.append(text); shapes.append(truck); - connect(shapeComboBox, QOverload<int>::of(&QComboBox::activated), + connect(shapeComboBox, &QComboBox::activated, this, &Window::shapeSelected); } //! [7] |