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")