Recalibrate



  • In my current project I wan't to make it possible to recalibrate my touchscreen. I'm using tslib and to recalibrate I just need to delete the calibration file and reboot.

    But how to do that, I can't make a button to delete, cause it is the touchscreen itself.
    I want to press the touchscreen while booting linux/qt and when qt find it is pressed, it has to wait for x seconds and then check again. If still pressed: delete calibration file.

    I tried this
    @
    QApplication a(argc, argv);

    if (a.mouseButtons() & Qt::LeftButton)
    {
        sleep(5);
        if (a.mouseButtons() & Qt::LeftButton)
        {
            qDebug() << "reset";
        }
    }
    

    @

    But this doesn't work.. (it doesn't show "reset")



  • It seems that mouseButtons aren't updated?



  • Should a touch on the touchscreen be seen as a Qt::LeftButton on the mouseButtons flag? How can I fake a mouseevent so this flags update?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.