fix: Pop up windows: About, Accounts, Account, Settings - opening on
centr of parent
This commit is contained in:
parent
ea7dcc5f18
commit
1af20e27f2
8 changed files with 34 additions and 29 deletions
|
@ -20,7 +20,7 @@
|
|||
#include "ui_settings.h"
|
||||
|
||||
Settings::Settings(QWidget* parent):
|
||||
QWidget(parent),
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::Settings()),
|
||||
modifiedSettings()
|
||||
{
|
||||
|
@ -34,6 +34,10 @@ Settings::Settings(QWidget* parent):
|
|||
connect(m_ui->applyButton, &QPushButton::clicked, this, &Settings::apply);
|
||||
connect(m_ui->okButton, &QPushButton::clicked, this, &Settings::confirm);
|
||||
connect(m_ui->cancelButton, &QPushButton::clicked, this, &Settings::close);
|
||||
|
||||
if (parent)
|
||||
move(parent->window()->frameGeometry().topLeft() +
|
||||
parent->window()->rect().center() - rect().center());
|
||||
}
|
||||
|
||||
Settings::~Settings()
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QListWidgetItem>
|
||||
#include <QScopedPointer>
|
||||
#include <QSettings>
|
||||
|
@ -36,7 +36,7 @@ class Settings;
|
|||
/**
|
||||
* @todo write docs
|
||||
*/
|
||||
class Settings : public QWidget
|
||||
class Settings : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue