ensured parenting of qwidgets

This commit is contained in:
itsmattkc
2019-01-30 17:36:54 +11:00
parent 54180e5e0d
commit 6f3a826da7
32 changed files with 350 additions and 357 deletions
+6 -7
View File
@@ -14,22 +14,21 @@
#include "mainwindow.h"
LoadDialog::LoadDialog(QWidget *parent, bool autorecovery) : QDialog(parent) {
setWindowTitle(tr("Loading..."));
setWindowTitle(tr("Loading..."));
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
QVBoxLayout* layout = new QVBoxLayout();
setLayout(layout);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(new QLabel(tr("Loading '%1'...").arg(project_url.mid(project_url.lastIndexOf('/')+1))));
layout->addWidget(new QLabel(tr("Loading '%1'...").arg(project_url.mid(project_url.lastIndexOf('/')+1)), this));
bar = new QProgressBar();
bar = new QProgressBar(this);
bar->setValue(0);
layout->addWidget(bar);
cancel_button = new QPushButton(tr("Cancel"));
cancel_button = new QPushButton(tr("Cancel"), this);
connect(cancel_button, SIGNAL(clicked(bool)), this, SLOT(cancel()));
hboxLayout = new QHBoxLayout();
hboxLayout = new QHBoxLayout(this);
hboxLayout->addStretch();
hboxLayout->addWidget(cancel_button);
hboxLayout->addStretch();