plugins/runcommand: Fix messed up layouting of KCM
This commit is contained in:
parent
77f44ce943
commit
d50055ddb4
1 changed files with 5 additions and 5 deletions
|
@ -70,21 +70,21 @@ RunCommandConfig::RunCommandConfig(QObject *parent, const QVariantList &args)
|
||||||
QTableView *table = new QTableView(widget());
|
QTableView *table = new QTableView(widget());
|
||||||
table->horizontalHeader()->setStretchLastSection(true);
|
table->horizontalHeader()->setStretchLastSection(true);
|
||||||
table->verticalHeader()->setVisible(false);
|
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());
|
QPushButton *button = new QPushButton(QIcon::fromTheme(QStringLiteral("list-add")), i18n("Sample commands"), widget());
|
||||||
button->setMenu(defaultMenu);
|
button->setMenu(defaultMenu);
|
||||||
layout->addWidget(button);
|
|
||||||
|
|
||||||
QHBoxLayout *importExportLayout = new QHBoxLayout(widget());
|
QHBoxLayout *importExportLayout = new QHBoxLayout();
|
||||||
QPushButton *exportButton = new QPushButton(i18n("Export"), widget());
|
QPushButton *exportButton = new QPushButton(i18n("Export"), widget());
|
||||||
importExportLayout->addWidget(exportButton);
|
importExportLayout->addWidget(exportButton);
|
||||||
connect(exportButton, &QPushButton::clicked, this, &RunCommandConfig::exportCommands);
|
connect(exportButton, &QPushButton::clicked, this, &RunCommandConfig::exportCommands);
|
||||||
QPushButton *importButton = new QPushButton(i18n("Import"), widget());
|
QPushButton *importButton = new QPushButton(i18n("Import"), widget());
|
||||||
importExportLayout->addWidget(importButton);
|
importExportLayout->addWidget(importButton);
|
||||||
connect(importButton, &QPushButton::clicked, this, &RunCommandConfig::importCommands);
|
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);
|
widget()->setLayout(layout);
|
||||||
|
|
||||||
m_entriesModel = new QStandardItemModel(this);
|
m_entriesModel = new QStandardItemModel(this);
|
||||||
|
|
Loading…
Reference in a new issue