From 23c6bb1b65357df1010d9801abffd03cd7747938 Mon Sep 17 00:00:00 2001
From: Jan Arve Saether <jan-arve.saether@theqtcompany.com>
Date: Fri, 21 Nov 2014 12:56:51 +0100
Subject: [PATCH] Only make scrollbars non-interactive on mobile devices.

Before this patch, I could not adjust the scrollbars in a ScrollArea on
a Windows 8.1 desktop computer just because it had a touch screen.

The same problem was observed on Linux (with touch screen).

Task-number: QTBUG-42806
Change-Id: I6f35c40b0362820d7c1685e1b6fc8474432237eb
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
---
 src/controls/Private/ScrollBar.qml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/controls/Private/ScrollBar.qml b/src/controls/Private/ScrollBar.qml
index 827504121..3bd0a1640 100644
--- a/src/controls/Private/ScrollBar.qml
+++ b/src/controls/Private/ScrollBar.qml
@@ -102,7 +102,7 @@ Item {
         onExited: if (!pressed) __panel.activeControl = "none"
         onMouseXChanged: if (!pressed) __panel.activeControl = __panel.hitTest(mouseX, mouseY)
         hoverEnabled: !Settings.hasTouchScreen
-        enabled: !Settings.hasTouchScreen // TODO: touch on desktop?
+        enabled: !Settings.isMobile || !Settings.hasTouchScreen // ### Not ideal, but will usually behave as expected...
         preventStealing: true
         property var pressedX
         property var pressedY
-- 
GitLab