Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15
-
None
Description
While looking for a workaround for QTBUG-80064, I thought I'd try WheelHandler. I saw that you can use it declaratively with a property, which is pretty cool. However, it scrolls in the opposite direction that I want it to, even with invertible set to false:
import QtQuick 2.15 import QtQuick.Controls 2.15 ApplicationWindow { width: 640 height: 480 visible: true ScrollView { id: scrollView contentWidth: width contentHeight: label.implicitHeight width: 320 height: 320 clip: true WheelHandler { target: scrollView.contentItem property: "contentY" invertible: false } Label { id: label width: parent.width wrapMode: Label.Wrap text: "Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text! Whoa this is a lot of text!" } } }
It should scroll down if the scroll wheel is scrolled down, and vice versa. The expected behaviour (in terms of scroll direction) can be seen by commenting out the WheelHandler and using Flickable's scroll handling.