diff options
Diffstat (limited to 'examples/widgets/tools/completer')
-rw-r--r-- | examples/widgets/tools/completer/CMakeLists.txt | 47 | ||||
-rw-r--r-- | examples/widgets/tools/completer/mainwindow.cpp | 8 |
2 files changed, 51 insertions, 4 deletions
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt new file mode 100644 index 0000000000..b60d38cfdc --- /dev/null +++ b/examples/widgets/tools/completer/CMakeLists.txt @@ -0,0 +1,47 @@ +# Generated from completer.pro. + +cmake_minimum_required(VERSION 3.14) +project(completer 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/tools/completer") + +find_package(Qt6 COMPONENTS Core) +find_package(Qt6 COMPONENTS Gui) +find_package(Qt6 COMPONENTS Widgets) + +add_qt_gui_executable(completer + fsmodel.cpp fsmodel.h + main.cpp + mainwindow.cpp mainwindow.h +) +target_link_libraries(completer PUBLIC + Qt::Core + Qt::Gui + Qt::Widgets +) + + +# Resources: +set(completer_resource_files + "resources/countries.txt" + "resources/wordlist.txt" +) + +qt6_add_resources(completer "completer" + PREFIX + "/" + FILES + ${completer_resource_files} +) + +install(TARGETS completer + RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" + BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" + LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" +) diff --git a/examples/widgets/tools/completer/mainwindow.cpp b/examples/widgets/tools/completer/mainwindow.cpp index b50e0a5456..8e9c0e0615 100644 --- a/examples/widgets/tools/completer/mainwindow.cpp +++ b/examples/widgets/tools/completer/mainwindow.cpp @@ -117,13 +117,13 @@ MainWindow::MainWindow(QWidget *parent) contentsLabel = new QLabel; contentsLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - connect(modelCombo, QOverload<int>::of(&QComboBox::activated), + connect(modelCombo, &QComboBox::activated, this, &MainWindow::changeModel); - connect(modeCombo, QOverload<int>::of(&QComboBox::activated), + connect(modeCombo, &QComboBox::activated, this, &MainWindow::changeMode); - connect(caseCombo, QOverload<int>::of(&QComboBox::activated), + connect(caseCombo, &QComboBox::activated, this, &MainWindow::changeCase); - connect(maxVisibleSpinBox, QOverload<int>::of(&QSpinBox::valueChanged), + connect(maxVisibleSpinBox, &QSpinBox::valueChanged, this, &MainWindow::changeMaxVisible); //! [2] |