Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QTouchDevice::devices() always 0



  • Hi,
    I am creating a desktop application that works on a touchscreen monitor. To find out when I am using a touchscreen, I use the static function "QTouchDevice::devices().Count()", but it always return 0.
    I can't understand where I'm wrong. Before using this function I have to do something?
    thank you


  • Lifetime Qt Champion

    Hi,

    What platform are you on ? Are you sure your touchscreen is not just seen as a mouse ?



  • On window 7.
    Why the touchscreen should be seen as a mouse?
    If so, I never know when the program is working on a touchscreen or a normal monitor.

    sorry for the late reply


Log in to reply