diff options
Diffstat (limited to 'examples/widgets/desktop/screenshot')
-rw-r--r-- | examples/widgets/desktop/screenshot/CMakeLists.txt | 6 | ||||
-rw-r--r-- | examples/widgets/desktop/screenshot/screenshot.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt index 9b85cc591e..3145dd41e5 100644 --- a/examples/widgets/desktop/screenshot/CMakeLists.txt +++ b/examples/widgets/desktop/screenshot/CMakeLists.txt @@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) -set(INSTALL_EXAMPLEDIR "examples") +set(INSTALL_EXAMPLEDIR "examples/widgets/desktop/screenshot") +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) find_package(Qt6 COMPONENTS Widgets) add_qt_gui_executable(screenshot @@ -18,6 +20,8 @@ add_qt_gui_executable(screenshot screenshot.cpp screenshot.h ) target_link_libraries(screenshot PUBLIC + Qt::Core + Qt::Gui Qt::Widgets ) diff --git a/examples/widgets/desktop/screenshot/screenshot.cpp b/examples/widgets/desktop/screenshot/screenshot.cpp index ce5597bbdd..bcbf99dd41 100644 --- a/examples/widgets/desktop/screenshot/screenshot.cpp +++ b/examples/widgets/desktop/screenshot/screenshot.cpp @@ -70,7 +70,7 @@ Screenshot::Screenshot() delaySpinBox->setSuffix(tr(" s")); delaySpinBox->setMaximum(60); - connect(delaySpinBox, QOverload<int>::of(&QSpinBox::valueChanged), + connect(delaySpinBox, &QSpinBox::valueChanged, this, &Screenshot::updateCheckBox); hideThisWindowCheckBox = new QCheckBox(tr("Hide This Window"), optionsGroupBox); |