Unsolved Multi-TableViews nested in a Flickable and mouse/wheel events
-
Hello all,
In a desktop application, I have a Flickable that contains 2 TableViews setup something like this:
Flickable { contentHeight: column.height Column { id: column Text {} // title TableView { height: row.height * rowCount } Text{} // title TableView { height: row.height * rowCount } } }
Now the issue is that the
TableView
eats all mouse event and I wish theFlickable
to be scrollable using the regular mouse grab and the wheel.
I did usedpressDelay: 100
on theFlickable
which would solve the grab to flick but would prevent double-click to work. (and still doesn't fix wheel events.)
flickableItem.interactive
in tableView has no effect.I use the TableViews to present data listView style but with headers (with sorting later on), I don't have any cell handling/interaction except click to select row, double-click/enter to activate and arrow up/down to navigate.
Any suggestion ?
Thank you in advances for any help.
-
So I kind of half fixed my issue:
if addBinding { target: __mouseArea property: "preventStealing" value: false }
in TableView I do get the flicking back but having to access a private var property feel a little hackish.
Now the issue left is that my mouse wheel event are still not propagated to the flickable.
N.B: forgot to specify, I'm using Qt 5.7
-
small update on what prevent me from getting the wheel event in the flickable when the mouse is on a tableview.
Based on source:
TableView
is base onBasicTableView
which is based onScrollView
which contains aWheelArea
in a internal item that I can't access.in https://code.qt.io/cgit/qt/qtquickcontrols.git/tree/src/controls/ScrollView.qml it's
wheelArea
inside thechildren
property and I can't find a way to deactivate it as it is in a internal Item.Any idee ?