第一阶段只差兼容性问题了
This commit is contained in:
@ -6,23 +6,27 @@
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_MainWindow.h"
|
||||
|
||||
|
||||
|
||||
#include "config.h"
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||
ui->setupUi(this);
|
||||
QDesktopWidget* desktopWidget = QApplication::desktop();
|
||||
QDesktopWidget* desktopWidget = QApplication::desktop();
|
||||
QRect deskRect = desktopWidget->availableGeometry();
|
||||
//delete desktopWidget;
|
||||
resize(deskRect.width()*0.8, deskRect.height()*0.8);
|
||||
setWindowState(Qt::WindowMaximized);
|
||||
mainWindowLayout=new MainWindowLayout(this);
|
||||
setCentralWidget(mainWindowLayout);
|
||||
setWindowState(Qt::WindowMaximized);
|
||||
setWindowTitle(QString::fromLocal8Bit(NAME));
|
||||
QString path = QApplication::applicationDirPath();
|
||||
path += LOGO_TITLEBAR;
|
||||
icon = new QIcon(path);
|
||||
setWindowIcon(*icon);
|
||||
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
delete icon;
|
||||
this->setCentralWidget(nullptr);
|
||||
delete mainWindowLayout;
|
||||
delete ui;
|
||||
|
Reference in New Issue
Block a user