Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Recalibrate

Recalibrate

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 1 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    ken536
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • K Offline
      K Offline
      ken536
      wrote on last edited by
      #2

      It seems that mouseButtons aren't updated?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        ken536
        wrote on last edited by
        #3

        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?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved