Skip to content

Commit b0e8bcf

Browse files
authored
[221_3] 软件首次启动时全屏 (#3142)
1 parent f962832 commit b0e8bcf

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

devel/221_3.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[221_3] 软件首次启动时全屏
2+
3+
## 如何测试
4+
5+
1. 删除缓存。
6+
2. 启动软件,查看是否全屏。
7+
8+
## 2026/04/14 软件首次启动时全屏

src/Plugins/Qt/QTMWindow.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
******************************************************************************/
1111

1212
#include "QTMWindow.hpp"
13+
#include "boot.hpp"
1314
#include "config.h"
1415
#if defined(USE_TUTORIAL)
1516
#include "qt_tutorial.hpp"
@@ -148,6 +149,10 @@ QTMWindow::resizeEvent (QResizeEvent* event) {
148149
void
149150
QTMWindow::showEvent (QShowEvent* event) {
150151
QMainWindow::showEvent (event);
152+
if (install_status == 1 && !property ("startupMaximizedApplied").toBool ()) {
153+
setProperty ("startupMaximizedApplied", true);
154+
showMaximized ();
155+
}
151156
#if defined(USE_TUTORIAL)
152157
QWK::FirstLaunchTutorialController::instance ()->maybeStartForMainWindow (
153158
this);

0 commit comments

Comments
 (0)