Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 72538fa0 authored by Laurent Montel's avatar Laurent Montel 😁

Assign layout directly

parent c85bc8eb
......@@ -61,7 +61,7 @@ private:
void ExportWidget::Private::setupUi()
{
auto vlay = new QVBoxLayout;
auto vlay = new QVBoxLayout(q);
textEdit = new QTextEdit;
textEdit->setVisible(false);
......@@ -73,8 +73,6 @@ void ExportWidget::Private::setupUi()
waitWidget = new WaitWidget;
waitWidget->setText(i18n("Exporting ..."));
vlay->addWidget(waitWidget);
q->setLayout(vlay);
}
ExportWidget::ExportWidget(QWidget *parent)
......
......@@ -47,11 +47,9 @@ public:
certificationsTV->setAllColumnsShowFocus(true);
certificationsTV->setSelectionMode(QAbstractItemView::ExtendedSelection);
auto vLay = new QVBoxLayout;
auto vLay = new QVBoxLayout(q);
vLay->addWidget(certificationsTV);
q->setLayout(vLay);
connect(certificationsTV, &QAbstractItemView::doubleClicked,
q, [this] (const QModelIndex &idx) {
certificationDblClicked(idx);
......
......@@ -54,7 +54,7 @@ KeyCacheOverlay::KeyCacheOverlay(QWidget *baseWidget, QWidget *parent)
return;
}
auto vLay = new QVBoxLayout;
auto vLay = new QVBoxLayout(this);
auto waitWidget = new WaitWidget(this);
......@@ -62,7 +62,6 @@ KeyCacheOverlay::KeyCacheOverlay(QWidget *baseWidget, QWidget *parent)
vLay->addWidget(waitWidget);
setLayout(vLay);
mBaseWidget->installEventFilter(this);
mBaseWidget->setEnabled(false);
......
......@@ -140,9 +140,8 @@ PGPCardWidget::PGPCardWidget():
auto areaWidget = new QWidget;
areaWidget->setLayout(grid);
area->setWidget(areaWidget);
auto myLayout = new QVBoxLayout;
auto myLayout = new QVBoxLayout(this);
myLayout->addWidget(area);
setLayout(myLayout);
// Version and Serialnumber
grid->addWidget(mVersionLabel, row++, 0, 1, 2);
......
......@@ -47,8 +47,6 @@ WaitWidget::WaitWidget(QWidget *parent)
vLay->addLayout(subLay2);
vLay->addStretch(1);
setLayout(vLay);
}
void WaitWidget::setText(const QString &text)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment