From 6c400bae03e9bf962f7fe1737b14cf5bb7d52c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AE=E7=94=9F=E8=8B=A5=E6=A2=A6?= <1070753498@qq.com> Date: Fri, 31 May 2024 12:45:53 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E5=A4=8DCrash=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E6=97=B6=E7=AA=97=E5=8F=A3=E6=BF=80=E6=B4=BB?= =?UTF-8?q?=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 通过在`main`函数中添加`app.setActiveWindow(&w);`,确保了Crash窗口在应用启动时成为活动窗口。 --- src/apps/crashreport/main.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apps/crashreport/main.cc b/src/apps/crashreport/main.cc index 366c62e..f5d9029 100644 --- a/src/apps/crashreport/main.cc +++ b/src/apps/crashreport/main.cc @@ -91,6 +91,7 @@ auto main(int argc, char *argv[]) -> int QNetworkProxyFactory::setUseSystemConfiguration(true); Crash::CrashWidgets w; + app.setActiveWindow(&w); w.show(); auto result = app.exec();