代码拉取完成,页面将自动刷新
From 72166cc21f423f9c7a93f4773080dced6bfa8564 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 24 Sep 2024 14:54:44 +0800
Subject: [PATCH] fix(QCompleter): Adjust the height of the QCompleter Popup
pop-up
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 针对QCompleter Popup弹出的高度进行调整
Closes #42329
---
style/src/style.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/style/src/style.cpp b/style/src/style.cpp
index 6fba993..000fe11 100644
--- a/style/src/style.cpp
+++ b/style/src/style.cpp
@@ -170,6 +170,8 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
switch (metric)
{
case PM_DefaultFrameWidth:
+ if (qobject_cast<const QAbstractScrollArea *>(widget))
+ return 2;
return 6;
case PM_SpinBoxFrameWidth:
return 2;
@@ -182,7 +184,6 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
case PM_FocusFrameVMargin:
case PM_FocusFrameHMargin:
return 2;
-
// 布局默认边距
case PM_LayoutLeftMargin:
case PM_LayoutTopMargin:
@@ -199,7 +200,7 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
return 6;
}
}
-
+
// 布局默认间距
case PM_LayoutHorizontalSpacing:
case PM_LayoutVerticalSpacing:
@@ -268,7 +269,6 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
case PM_TabCloseIndicatorWidth:
case PM_TabCloseIndicatorHeight:
return pixelMetric(PM_SmallIconSize, option, widget);
-
// scrollbars
case PM_ScrollBarExtent:
return 5;
@@ -317,7 +317,6 @@ int Style::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option, c
return 1;
case PM_DockWidgetSeparatorExtent:
return 1;
-
default: // fallback
break;
}
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。