From 30850e7e66ffe20137d6b1f317d56360414772d0 Mon Sep 17 00:00:00 2001 From: MRXY001 Date: Wed, 11 Jan 2023 19:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A4=9A=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=99=A8=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- third_party/facile_menu/facilemenu.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/third_party/facile_menu/facilemenu.cpp b/third_party/facile_menu/facilemenu.cpp index a9c35be..df335c4 100644 --- a/third_party/facile_menu/facilemenu.cpp +++ b/third_party/facile_menu/facilemenu.cpp @@ -14,7 +14,6 @@ FacileMenu::FacileMenu(QWidget *parent) : QWidget(parent) setAttribute(Qt::WA_DeleteOnClose, true); setFocusPolicy(Qt::StrongFocus); // 获取焦点,允许按键点击 setWindowFlag(Qt::Popup, true); - // setWindowFlag(Qt::NoDropShadowWindowHint, true); setAutoFillBackground(false); //这个不设置的话就背景变黑 setAttribute(Qt::WA_StyledBackground); @@ -30,7 +29,7 @@ FacileMenu::FacileMenu(QWidget *parent) : QWidget(parent) setMouseTracking(true); // 获取窗口尺寸 - window_rect = QApplication::desktop()->availableGeometry(); + window_rect = QApplication::screenAt(QCursor::pos())->geometry(); window_height = window_rect.height(); }