Important: Please read the Qt Code of Conduct -

QTouchEvent, interaction lost

  • Dear all,

    I have a problem with the touch event on my tablet.
    I developed a GUI, with buttons and an interactive "map" which consist of a QGraphicsScene with a QGraphicsPixMap and interactives zones inheriting from QGraphicsRectItem to overload mouseEvent().

    The problem is that time-randomly I lose the "touch interaction" with the buttons and the interactive map, that is to say, that time-randomly the touches are not processed anymore. To get back the interaction I have to switch to another program (e.g. notepad, paint or what ever) and switch back to my program...
    The thing is that I never lose the interaction using a mouse...
    Could the problem come from a "full" stack?



  • Hi,

    It would be easier to answer you with some demonstrating code.

  • It is complicated to post example code as I do not know where the problem is in the whole project.
    I mean, giving code would target a zone in the project where possibly the bug could lie, zone that I am not able to determine.

    My question should have been: Does someone already observe a problem of interaction with an interface using touches but not using a mouse?
    May be it come from my device, but it is strange as, when I loose the interaction, if I "touch" a button it becomes gray but nothing append.
    I don't understand how it changes from both touches and mouse interaction work to only mouse interaction works...

  • Lat news:

    I have implemented an event manager using eventFilter(...)
    I can observe that the events received when used on the tablet with the touch screen are

    I also observe that sometimes their is no event received among:

    I continue to investigate, but if you have any clues...

  • Printing the type of event received I observe that sometimes instead of the couple QEvent::TouchBegin / QEvent::TouchEnd I receive some QEvent::HoverMove.

    It is totally random, and if I click another button and come back to the previous I receive the right events...

Log in to reply