[Interest] How to preventing Flickable to steal touch events

Kate Alhola kate.alhola at gmail.com
Thu Nov 27 11:27:21 CET 2014


On Wed, Nov 26, 2014 at 3:52 PM, Frederik Gladhorn <
frederik.gladhorn at theqtcompany.com> wrote:

> On Wednesday, November 26, 2014 12:53:54 PM Kate Alhola wrote:
> > I have tried to get QtQuick2 maps to work with flickable.  The issue is
> > that Flickable steals touch events from Maps gesture area.  There is no
> > prevent stealing property on map component.
> >
> > QDeclarativeGeoMap  inherits QQuickItem . QQuickItem has
> > grabTouchPoints(const QVector<int> & ids) and setKeepTouchGrab(bool keep)
> > methods.
> >
> > I modified QDeclarativeGeoMap::touchEvent to usegrabTouchPoints and
> > setKeepTouchGrab but still I can't prevent flickable to steal touch
> events.
>
> You could try to also set the mouse equivalents (setKeepMouseGrab iirc).
>

Thanks, that helped. Even QDeclarativeGeoMap does not receive any
mouseEvents in touch screen device I still need to grab also mouse events.

Now I have made fixed version of QDeclarativeGeoMap that works with
flickable. It just requires implementing preventStealing functiuonality. I
also noticed that it would be usefull to prevent some marigin on edges
where it does not grab events so that i could flick flickable from swiping
from egges.

Kate


>
> Cheers,
> Frederik
>
>
> >
> > Is there any method even in C++ level to prevent flickable to stealing
> > events from QQuickItem ?
> >
> > Kate
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141127/159ed409/attachment.html>


More information about the Interest mailing list