From 034a10b350a5eab36c6b4281d36e26789daba626 Mon Sep 17 00:00:00 2001 From: zhoudisi Date: Mon, 22 Apr 2024 16:09:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=80=82=E9=85=8Dsdk=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhoudisi --- src/mainwindow.cpp | 6 +++++- src/menumodule/menumodule.cpp | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 21cafc6..2f1accf 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -817,7 +817,11 @@ void MainWindow::changeLightTheme() void MainWindow::pullUpWindow() { qDebug() << "show MainWindow"; - KWindowSystem::forceActiveWindow(this->winId()); + if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive)) { + kabase::WindowManage::activateWindow(MainWindow::getInstance()->getWinId()); + }else{ + KWindowSystem::forceActiveWindow(this->winId()); + } this->show(); } diff --git a/src/menumodule/menumodule.cpp b/src/menumodule/menumodule.cpp index a05ffa1..deef770 100755 --- a/src/menumodule/menumodule.cpp +++ b/src/menumodule/menumodule.cpp @@ -109,6 +109,7 @@ void menuModule::aboutAction() m_aboutWindow->setBodyTextVisiable(true); m_aboutWindow->setWindowModality(Qt::WindowModal); m_aboutWindow->setWindowModality(Qt::ApplicationModal); + kabase::WindowManage::removeHeader(m_aboutWindow); m_aboutWindow->show(); m_aboutWindow->exec();