From 4d6cd112ab3cf06e7f0b1a0b4e4c5c33ce49fa2e Mon Sep 17 00:00:00 2001 From: Yansheng Zhu <670429759@qq.com> Date: Thu, 18 Apr 2024 15:49:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E4=BA=8C=E7=BA=A7=E8=8F=9C=E5=8D=95=E5=90=8E?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E4=BD=8D=E7=BD=AE=E5=BC=82=E5=B8=B8=20(#792,?= =?UTF-8?q?=20#844)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qfluentwidgets/components/widgets/menu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qfluentwidgets/components/widgets/menu.py b/qfluentwidgets/components/widgets/menu.py index a0e7d6da3..46499dfb0 100644 --- a/qfluentwidgets/components/widgets/menu.py +++ b/qfluentwidgets/components/widgets/menu.py @@ -208,7 +208,8 @@ def adjustSize(self, pos=None, aniType=MenuAnimationType.NONE): # adjust the height of viewport w, h = MenuAnimationManager.make(self, aniType).availableViewSize(pos) - self.viewport().adjustSize() + r = self.viewport().childrenRect() + self.viewport().resize(r.size()) # adjust the height of list widget m = self.viewportMargins()