@GrecKo Thank you for your answer.
the wheel signal provides a wheel object though, you can do wheel.accepted = false.
Good point, I missed that. This resolve the issue I faced with onWheel.
The more correct way to get parameter from signal handlers now is to define them as function, not rely on context properties.
Ok, thanks for the tip. I'll try this way in the future.
I am curious about your usecase of capturing onWheel on a ListView, can you give more details?
In my case it's just to close a hint opened from a button on an item in my view. The hint position is linked to the opening button position, and as I use a ToolTip, the hint continue to scroll outside my view when the item containing the button go out of the view. For that reason I want to close this hint before scrolling the view.
Anyway, have you looked at Qt Quick Input Handlers?
This seems to be an interesting alternative indeed. However I tried to use it, but it seems not react at all in my view. Here is the code I tested, am I doing something wrong?
TapHandler
{
target: myView
acceptedButtons: Qt.LeftButton | Qt.RightButton
onTapped:
{
console.log("onTapped called...");
}
onSingleTapped:
{
console.log("onSingleTapped called...");
}
}