From 63ffacff96b315a2aa1b7c80dd8b5d8b4b05a7d0 Mon Sep 17 00:00:00 2001 From: DLmaster361 Date: Fri, 18 Jul 2025 21:59:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20SpinBox=E5=92=8CTimeEdit=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BF=BD=E8=A7=86=E6=BB=9A=E8=BD=AE=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ui/Widget.py | 19 +++++++++++++++++-- resources/version.json | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/app/ui/Widget.py b/app/ui/Widget.py index a6c91e2..a5c3342 100644 --- a/app/ui/Widget.py +++ b/app/ui/Widget.py @@ -59,7 +59,6 @@ from qfluentwidgets import ( MessageBox, SubtitleLabel, SettingCard, - SpinBox, FluentIconBase, Signal, ComboBox, @@ -71,7 +70,6 @@ from qfluentwidgets import ( BodyLabel, QConfig, ConfigItem, - TimeEdit, OptionsConfigItem, TeachingTip, TransparentToolButton, @@ -98,6 +96,23 @@ from qfluentwidgets.common.overload import singledispatchmethod from app.core import Config from app.services import Crypto +from qfluentwidgets import SpinBox as SpinBoxBase +from qfluentwidgets import TimeEdit as TimeEditBase + + +class SpinBox(SpinBoxBase): + """忽视滚轮事件的SpinBox""" + + def wheelEvent(self, event): + event.ignore() + + +class TimeEdit(TimeEditBase): + """忽视滚轮事件的TimeEdit""" + + def wheelEvent(self, event): + event.ignore() + class LineEditMessageBox(MessageBoxBase): """输入对话框""" diff --git a/resources/version.json b/resources/version.json index 5bba291..6fe8240 100644 --- a/resources/version.json +++ b/resources/version.json @@ -11,7 +11,8 @@ ], "程序优化": [ "重构日志记录,载入更多日志记录项", - "优化日志监看启停逻辑" + "优化日志监看启停逻辑", + "SpinBox和TimeEdit组件忽视滚轮事件" ] } }