I was wondering if there's any way for ListView
to behave like a desktop control and not react with scrolling to mouse dragging?
I know about the interactive
property, but I still want the ListView
to react to clicks, mouse wheel, arrow keys, and have a ScrollBar
.
For starters, setting
interactive
tofalse
will pretty much immobilize the view.There is a
keyNavigationEnabled
property which doesn't seem to work at this moment(this critical bug).So will need to do a little extra work to get it to work as you want:
Interactivity is disabled, key navigation is implemented manually, and a background
MouseArea
is used to capture wheel events. Note that you don't have to do anything special to enable clicking on items for a non-interactive view, it works regardless of the view is interactive or not.