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
TableVieweats all mouse event and I wish theFlickableto be scrollable using the regular mouse grab and the wheel.
I did usedpressDelay: 100on theFlickablewhich would solve the grab to flick but would prevent double-click to work. (and still doesn't fix wheel events.)
flickableItem.interactivein 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:
TableViewis base onBasicTableViewwhich is based onScrollViewwhich contains aWheelAreain a internal item that I can't access.in https://code.qt.io/cgit/qt/qtquickcontrols.git/tree/src/controls/ScrollView.qml it's
wheelAreainside thechildrenproperty and I can't find a way to deactivate it as it is in a internal Item.Any idee ?