Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTouchDevice::devices() always 0
Forum Update on Monday, May 27th 2025

QTouchDevice::devices() always 0

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 558 Views
  • 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.
  • Gianluca86G Offline
    Gianluca86G Offline
    Gianluca86
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Gianluca86G Offline
        Gianluca86G Offline
        Gianluca86
        wrote on last edited by
        #3

        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

        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