more on mainwindow

This commit is contained in:
Martin Brodbeck 2018-07-14 15:54:29 +02:00
parent a490dafb02
commit 31d46866f2
2 changed files with 13 additions and 3 deletions

View file

@ -2,5 +2,10 @@
MainWindow::MainWindow() MainWindow::MainWindow()
{ {
ui.setupUi(this); ui_.setupUi(this);
}
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::quit);
marketplace_ = std::make_unique<Marketplace>();
}

View file

@ -1,9 +1,13 @@
#ifndef MAINWINDOW_H #ifndef MAINWINDOW_H
#define MAINWINDOW_H #define MAINWINDOW_H
#include <marketplace.h>
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include <QMainWindow> #include <QMainWindow>
#include <memory>
class MainWindow : public QMainWindow class MainWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -12,7 +16,8 @@ class MainWindow : public QMainWindow
MainWindow(); MainWindow();
private: private:
Ui::MainWindow ui; Ui::MainWindow ui_;
std::unique_ptr<Marketplace> marketplace_;
}; };
#endif #endif