diff --git a/config.cpp b/config.cpp index 3271c32..c41b2e8 100644 --- a/config.cpp +++ b/config.cpp @@ -127,13 +127,13 @@ void PassConfigForm::validateAddButton() this->lineRegEx->text().isEmpty()); } -PassConfig::PassConfig(QWidget *parent, const KPluginMetaData &data, const QVariantList &args) +PassConfig::PassConfig(QObject *parent, const KPluginMetaData &data, const QVariantList &args) : KCModule(parent, data) { Q_UNUSED(args) - this->ui = new PassConfigForm(this); - QGridLayout *layout = new QGridLayout(this); + this->ui = new PassConfigForm(this->widget()); + QGridLayout *layout = new QGridLayout(this->widget()); layout->addWidget(ui, 0, 0); #if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 64, 0) const auto changedSlotPointer = &PassConfig::markAsChanged; diff --git a/config.h b/config.h index be8bdde..152b50c 100644 --- a/config.h +++ b/config.h @@ -87,7 +87,7 @@ class PassConfig : public KCModule Q_OBJECT public: - explicit PassConfig(QWidget *parent = nullptr, + explicit PassConfig(QObject *parent = nullptr, const KPluginMetaData &data = {}, const QVariantList &args = QVariantList());