换完IDE了
This commit is contained in:
34
OfficeAssistant_msvc/mainwindow.cpp
Normal file
34
OfficeAssistant_msvc/mainwindow.cpp
Normal file
@ -0,0 +1,34 @@
|
||||
//
|
||||
// Created by HW on 2023/07/26.
|
||||
//
|
||||
|
||||
// You may need to build the project (run Qt uic code generator) to get "ui_MainWindow.h" resolved
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_MainWindow.h"
|
||||
|
||||
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||
ui->setupUi(this);
|
||||
QDesktopWidget* desktopWidget = QApplication::desktop();
|
||||
QRect deskRect = desktopWidget->availableGeometry();
|
||||
delete desktopWidget;
|
||||
mainWindowLayout=new MainWindowLayout(this);
|
||||
setCentralWidget(mainWindowLayout);
|
||||
if(deskRect.width()*scale>1920){
|
||||
resize(1600,1080);
|
||||
this->setMaximumWidth(1600);
|
||||
}else{
|
||||
resize(800, 540);
|
||||
this->setMaximumWidth(800);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
delete mainWindowLayout;
|
||||
delete ui;
|
||||
}
|
Reference in New Issue
Block a user