src/mainwindow.cpp

changeset 3
55a55a9ec2c2
parent 1
51d14b0c68c0
child 5
593a658cba8e
equal deleted inserted replaced
2:2bdc3ac5e77c 3:55a55a9ec2c2
1 #include "mainwindow.h" 1 #include "mainwindow.h"
2 #include "ui_mainwindow.h" 2 #include "ui_mainwindow.h"
3 #include "version.h" 3 #include "version.h"
4 #include <QQuaternion>
4 5
5 MainWindow::MainWindow(QWidget *parent) : 6 MainWindow::MainWindow(QWidget *parent) :
6 QMainWindow{parent}, 7 QMainWindow{parent},
7 ui{*new Ui_MainWindow} 8 ui{std::make_unique<Ui_MainWindow>()}
8 { 9 {
9 ui.setupUi(this); 10 ui->setupUi(this);
10 connect(ui.actionQuit, &QAction::triggered, this, &QMainWindow::close); 11 connect(ui->actionQuit, &QAction::triggered, this, &QMainWindow::close);
11 QString title = ::appName; 12 QString title = ::appName;
12 title += " "; 13 title += " ";
13 title += fullVersionString(); 14 title += fullVersionString();
14 setWindowTitle(title); 15 setWindowTitle(title);
15 } 16 }
16 17
17 MainWindow::~MainWindow() 18 MainWindow::~MainWindow()
18 { 19 {
19 delete &this->ui;
20 } 20 }

mercurial