diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS Config ConfigWidgets I18n IconThemes KIO Notifications Wayland - WidgetsAddons WindowSystem + WidgetsAddons WindowSystem ConfigWidgets ) find_package(XCB COMPONENTS XCB) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,4 +2,4 @@ target_link_libraries(qfiledialogtest Qt5::Core Qt5::Widgets) add_executable(windowdecotest windowdecotest.cpp) -target_link_libraries(windowdecotest Qt5::Core Qt5::Widgets) +target_link_libraries(windowdecotest Qt5::Core Qt5::Widgets KF5::ConfigWidgets) diff --git a/tests/windowdecotest.cpp b/tests/windowdecotest.cpp --- a/tests/windowdecotest.cpp +++ b/tests/windowdecotest.cpp @@ -26,6 +26,12 @@ #include #include #include +#include +#include +#include +#include +#include + class ATestWindow: public QWidget { @@ -50,8 +56,17 @@ QTimer::singleShot(1000, this, [this](){this->show();}); }); + QComboBox *colorCombo = new QComboBox(); + KColorSchemeManager *schemes = new KColorSchemeManager(this); + colorCombo->setModel(schemes->model()); + + connect(colorCombo, QOverload::of(&QComboBox::activated), schemes, [=](int row) { + schemes->activateScheme(colorCombo->model()->index(row, 0)); + }); + QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(mBtn); + layout->addWidget(colorCombo); setLayout(layout); }