Qt World Summit: Register Today!

Touchscreen bounces with Qt app.

  • Today I got a new panel PC, I believe it may be the cheapest one available. The thing has an Ltd eGalax touchscreen and with Ubuntu 16.04 LTS installed it works out of the box like a charm.

    But when I run my Qt application, the touchscreen bounces.....alot. When I boot to the desktop there seems to be no problem at all. The virtual keyboard of ubuntu also works perfect. My fancy Qtumbler does not work now :(

    My application is run on it's own desktop (so it can run fullscreen).

    I do not know where the problem might be. The problem might be related to Qt (5.8) or it might related to the separate desktop. But I have no way to test this.

    I don't know if there are any known issues between Qt apps and certain touchscreen drivers??

  • Moderators

    @bask185 said in Touchscreen bounces with Qt app.:

    But when I run my Qt application, the touchscreen bounces.....alot.

    what exactly does this mean?

  • I mean it bounces just like a bouncing switch. When I hold my finger on a pushbutton (yes, autorepeat is disabled), I see the state toggling and events are being executed continously instead of just one time. This prevents me from using the Qtumbler :(

  • So nobody has a clue why Qt on this systems behaves like this?

  • Lifetime Qt Champion


    Do you have the same strange behaviour if you compile your application your distribution provided Qt ?

  • @SGaist No I only have it on this particular panel PC. The PC has ubuntu installed like my host pc and other panel PCs

    Unfortunately this thing must be shipped out as a pilot. So I have to fix the flickering. I tried using QThread::msleep(); but that does not solve the problem it only makes it slower.

    If I push a button and the msleep is set at 300ms I am still getting 3 events instead of just 1.

    I think I came up with a viable simple solution. When I push a button I want to set a boolean variable true and let it go to false after a time has expired. When the boolean is set to true, no actions will happen.


    void on_pushbutton_clicked()
       if(boolean == false) {

  • Lifetime Qt Champion

    Usually de-bouncing is done using a single shot timer that is connected to the actual slot that will do something.

Log in to reply