From d50055ddb41e2893cdfadc6eda5d5519983d82f3 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Mon, 17 Apr 2023 21:42:42 +0200 Subject: [PATCH] plugins/runcommand: Fix messed up layouting of KCM --- plugins/runcommand/runcommand_config.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/runcommand/runcommand_config.cpp b/plugins/runcommand/runcommand_config.cpp index bead9f3c7..21e6a0f0f 100644 --- a/plugins/runcommand/runcommand_config.cpp +++ b/plugins/runcommand/runcommand_config.cpp @@ -70,21 +70,21 @@ RunCommandConfig::RunCommandConfig(QObject *parent, const QVariantList &args) QTableView *table = new QTableView(widget()); table->horizontalHeader()->setStretchLastSection(true); table->verticalHeader()->setVisible(false); - QVBoxLayout *layout = new QVBoxLayout(widget()); - layout->addWidget(table); QPushButton *button = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add")), i18n("Sample commands"), widget()); button->setMenu(defaultMenu); - layout->addWidget(button); - QHBoxLayout *importExportLayout = new QHBoxLayout(widget()); + QHBoxLayout *importExportLayout = new QHBoxLayout(); QPushButton *exportButton = new QPushButton(i18n("Export"), widget()); importExportLayout->addWidget(exportButton); connect(exportButton, &QPushButton::clicked, this, &RunCommandConfig::exportCommands); QPushButton *importButton = new QPushButton(i18n("Import"), widget()); importExportLayout->addWidget(importButton); connect(importButton, &QPushButton::clicked, this, &RunCommandConfig::importCommands); - layout->addLayout(importExportLayout); + QVBoxLayout *layout = new QVBoxLayout(); + layout->addWidget(table); + layout->addLayout(importExportLayout); + layout->addWidget(button); widget()->setLayout(layout); m_entriesModel = new QStandardItemModel(this);