窗口大小调大到1440并启动时居中

This commit is contained in:
CalciteM Team 2019-06-29 13:17:39 +08:00
parent d328d98069
commit 73d334ee60
3 changed files with 4 additions and 0 deletions

Binary file not shown.

View File

@ -1,10 +1,12 @@
#include "ninechesswindow.h"
#include <QtWidgets/QApplication>
#include <QDesktopWidget>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
NineChessWindow w;
w.show();
w.move((QApplication::desktop()->width() - w.width()) / 2, (QApplication::desktop()->height() - w.height()) / 2);
return a.exec();
}

View File

@ -258,6 +258,8 @@ void NineChessWindow::initialize()
// 更新四个键的状态
on_actionRowChange();
this->resize(QSize(1440, 1440));
// 窗口最大化
#ifdef SHOW_MAXIMIZED_ON_LOAD
showMaximized();