From 613bebfb463e18fca895bb2373dd3a46b73f80d9 Mon Sep 17 00:00:00 2001 From: lichangze Date: Sat, 12 Feb 2022 14:13:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=8F=E8=93=9D=E7=89=99=E5=88=97=E8=A1=A8=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E8=A7=A6=E6=91=B8=E6=A1=86=E6=97=A0=E6=B3=95=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E6=BB=91=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复任务栏蓝牙列表桌面触摸框无法上下滑动 Log: 修复任务栏蓝牙列表桌面触摸框无法上下滑动 Bug: https://pms.uniontech.com/zentao/bug-view-113135.html Influence: 任务栏蓝牙列表列表触摸滑动 Change-Id: I5c5d2d486407b5a5a39c8a4febf1dbd695713731 --- plugins/bluetooth/componments/bluetoothapplet.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/bluetooth/componments/bluetoothapplet.cpp b/plugins/bluetooth/componments/bluetoothapplet.cpp index cc4daf530..3cceb079f 100644 --- a/plugins/bluetooth/componments/bluetoothapplet.cpp +++ b/plugins/bluetooth/componments/bluetoothapplet.cpp @@ -39,6 +39,8 @@ #include #include #include +#include +#include SettingLabel::SettingLabel(QString text, QWidget *parent) : QWidget(parent) @@ -105,6 +107,13 @@ BluetoothApplet::BluetoothApplet(QWidget *parent) { initUi(); initConnect(); + + + QScroller::grabGesture(m_scroarea, QScroller::LeftMouseButtonGesture); + QScrollerProperties propertiesOne = QScroller::scroller(m_scroarea)->scrollerProperties(); + QVariant overshootPolicyOne = QVariant::fromValue(QScrollerProperties::OvershootAlwaysOff); + propertiesOne.setScrollMetric(QScrollerProperties::VerticalOvershootPolicy, overshootPolicyOne); + QScroller::scroller(m_scroarea)->setScrollerProperties(propertiesOne); } bool BluetoothApplet::poweredInitState()