Bug 512110

Summary: ScrollView acceleration glitches out when items are unevenly sized (mostly on trackpads)
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: adokhniak
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: REPORTED ---    
Severity: normal CC: ahiemstra, kde, noahadvs, notmart
Priority: NOR    
Version First Reported In: 6.20.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: A video of the glitch and the intended behavior side by side

Description adokhniak 2025-11-15 01:13:41 UTC
Created attachment 186800 [details]
A video of the glitch and the intended behavior side by side

When QT_QUICK_CONTROLS_STYLE="org.kde.desktop", ScrollView acceleration behaviour changes.
The changed behavior seems to be sensitive to size changes of the scrolled items, and often overscrolles, and doesn't return.

I've an extreme example,  of this behavior.

Steps to reproduce:
1. Paste the following in a file, e.g Repeated.qml
```qml
import QtQuick
import QtQuick.Controls

Window {
	visible: true
	title: qsTr("Hello World")
	color: "black"

	ScrollView {
			width: parent.width
			height: parent.height
		ListView {
			reuseItems: true
			width: parent.width
			height: parent.height

			clip: true
			model: 100
			anchors.horizontalCenter: parent.horizontalCenter
			spacing: 5

			delegate: Rectangle {
				required property int index
				width: 100;
				height: 10 + (100 - index);
				color: "green"
			}
		}
	}
}
```
2. Launch the file with the following command:
QT_QUICK_CONTROLS_STYLE="org.kde.desktop" qml6 Repeated.qml

3. Using the trackpad, flick the items downwards

While this also glitches when using a scroll wheel, it is way way less consistent,
and not as drastic as in the case of the touchpad.
On the mouse, the content sometimes "overscrolls" without coming down, but only by ~10% of the height of the view.

I tried using the `flick` method, but it works perfectly without creating this bug

qml6 --version:
Qml Runtime 6.10.0

qqc2-desktop-style: 6.19.0-1