summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-24 08:07:12 +0200
committerMontel Laurent <[email protected]>2017-04-24 08:07:12 +0200
commit4e117335a2cf69a28e874ab6e640a3b33244d44d (patch)
treee6434ae0474c9cee5766af00d56e83d90ae38001
parentee4d005c396f099c4e310e39825bc8eacb1d33b2 (diff)
Fix layout
-rw-r--r--gui/dialog/pimsettingexporterconfiguredialog.cpp3
-rw-r--r--gui/dialog/showarchivestructuredialog.cpp16
-rw-r--r--gui/dialog/synchronizeresourcedialog.cpp7
3 files changed, 13 insertions, 13 deletions
diff --git a/gui/dialog/pimsettingexporterconfiguredialog.cpp b/gui/dialog/pimsettingexporterconfiguredialog.cpp
index 3aae6e5..19b78f0 100644
--- a/gui/dialog/pimsettingexporterconfiguredialog.cpp
+++ b/gui/dialog/pimsettingexporterconfiguredialog.cpp
@@ -28,8 +28,7 @@ PimSettingExporterConfigureDialog::PimSettingExporterConfigureDialog(QWidget *pa
: QDialog(parent)
{
setWindowTitle(i18n("Configure PimSettingExporter"));
- QVBoxLayout *layout = new QVBoxLayout;
- setLayout(layout);
+ QVBoxLayout *layout = new QVBoxLayout(this);
mConfigureWidget = new PimSettingExporterConfigureWidget(this);
mConfigureWidget->setObjectName(QStringLiteral("configurewidget"));
layout->addWidget(mConfigureWidget);
diff --git a/gui/dialog/showarchivestructuredialog.cpp b/gui/dialog/showarchivestructuredialog.cpp
index f645699..b4bb8f9 100644
--- a/gui/dialog/showarchivestructuredialog.cpp
+++ b/gui/dialog/showarchivestructuredialog.cpp
@@ -40,17 +40,19 @@ ShowArchiveStructureDialog::ShowArchiveStructureDialog(const QString &filename,
mFileName(filename)
{
setWindowTitle(i18n("Show Archive Content on file \"%1\"", filename));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
- QVBoxLayout *mainLayout = new QVBoxLayout;
- setLayout(mainLayout);
- QPushButton *user1Button = new QPushButton;
- buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
- connect(buttonBox, &QDialogButtonBox::rejected, this, &ShowArchiveStructureDialog::reject);
setModal(true);
- mTreeWidget = new QTreeWidget;
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+
+ mTreeWidget = new QTreeWidget(this);
mTreeWidget->header()->hide();
mTreeWidget->setAlternatingRowColors(true);
+
KTreeWidgetSearchLine *searchLine = new KTreeWidgetSearchLine(this, mTreeWidget);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
+ QPushButton *user1Button = new QPushButton;
+ buttonBox->addButton(user1Button, QDialogButtonBox::ActionRole);
+ connect(buttonBox, &QDialogButtonBox::rejected, this, &ShowArchiveStructureDialog::reject);
+
mainLayout->addWidget(searchLine);
mainLayout->addWidget(mTreeWidget);
mainLayout->addWidget(buttonBox);
diff --git a/gui/dialog/synchronizeresourcedialog.cpp b/gui/dialog/synchronizeresourcedialog.cpp
index 548b988..c11e099 100644
--- a/gui/dialog/synchronizeresourcedialog.cpp
+++ b/gui/dialog/synchronizeresourcedialog.cpp
@@ -33,14 +33,13 @@ SynchronizeResourceDialog::SynchronizeResourceDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Synchronize Resources"));
- QVBoxLayout *topLayout = new QVBoxLayout;
- setLayout(topLayout);
+ QVBoxLayout *topLayout = new QVBoxLayout(this);
- QLabel *lab = new QLabel(i18n("Some resources were added but data were not sync. Select resources that you want to sync:"));
+ QLabel *lab = new QLabel(i18n("Some resources were added but data were not sync. Select resources that you want to sync:"), this);
lab->setWordWrap(true);
lab->setObjectName(QStringLiteral("label"));
- QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
buttonBox->setObjectName(QStringLiteral("buttonbox"));
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);