From 45727053bf09d65b09642e29703a809932646e94 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Mon, 23 Nov 2015 08:11:23 +0100 Subject: [PATCH] Use QFormlayout here --- .../storageservice/dialog/storageservicepropertiesdialog.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pimcommon/src/storageservice/dialog/storageservicepropertiesdialog.cpp b/pimcommon/src/storageservice/dialog/storageservicepropertiesdialog.cpp index 43513ab0c2..6c09f8f459 100644 --- a/pimcommon/src/storageservice/dialog/storageservicepropertiesdialog.cpp +++ b/pimcommon/src/storageservice/dialog/storageservicepropertiesdialog.cpp @@ -28,6 +28,7 @@ #include #include #include +#include using namespace PimCommon; @@ -53,11 +54,10 @@ void StorageServicePropertiesDialog::createInformationWidget(const QMapsetLayout(grid); + QFormLayout *layout = new QFormLayout; + parent->setLayout(layout); QMapIterator i(information); - int row = 0; while (i.hasNext()) { i.next(); QLabel *type = new QLabel; @@ -66,15 +66,12 @@ void StorageServicePropertiesDialog::createInformationWidget(const QMapsetFont(font); type->setAlignment(Qt::AlignRight); type->setText(i.key()); - grid->addWidget(type, row, 0); QLabel *info = new QLabel; info->setTextInteractionFlags(Qt::TextBrowserInteraction); info->setAlignment(Qt::AlignLeft); info->setText(i.value()); - grid->addWidget(info, row, 1); - - ++row; + layout->addRow(type, info); } mainLayout->addWidget(parent); mainLayout->addWidget(buttonBox); -- 2.11.4.GIT