https://bugs.kde.org/show_bug.cgi?id=479175

--- Comment #3 from b...@mogwai.be ---
I got a bit further with debugging this, and it seems that my previous hunch
was close.

The problem seems to be related to using TapHandler instead of MouseArea.
It seems that TapHandler's `onTapped` slot (which pushes a new page) is
completely finished before the ColumnView gets to handle the ButtonRelease
event.  This triggers `setCurrentIndex` while m_mouseDown is still true, so it
will not start the animation to slide to the new page.
Once the ColumnView gets to process the button release event, it will treat it
as a click on the current page instead of the new page, so it will start a new
animation to slide to the current page rather than the newly pushed one.

In contrast, with MouseArea, the ColumnView first gets to process the
ButtonReleases event before MouseArea processes the click.

I don't know know the reason of this difference, but could it perhaps be
related to this:
https://doc.qt.io/qt-6.6/qtquickhandlers-index.html#pointer-grab ? 
It says that Taphandler gets a first go since it's a child of the item. Next,
the item itself (i.e. the delegate) gets a go, which means that it first goes
through the childMouseEventFilter which decides whether or not to do anything
with the click? So, effectively, it seems like TapHandler will therefore always
finish before the filter?

NB: As a *workaround*, one could use TapHandler's `onSingleTapped` together
with 
`exclusiveSignals: (TapHandler.SingleTap | TapHandler.DoubleTap)`
This ensures that the taphandler will only process the event after the
double-click interval has expired, which is apparently long enough for
columnview to do its business first.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to