Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Missing PointerDevice Type?
Qt 6.11 is out! See what's new in the release blog

Missing PointerDevice Type?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 753 Views 2 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.
  • J Offline
    J Offline
    JrDeskJockey
    wrote on last edited by
    #1

    Hello. I was hoping to see if I could detect if the platform my app is running on contains a touch screen or not. I found this PointerDevice QML type in both the 5.10 and 5.11 documentation...
    https://doc.qt.io/archives/qt-5.10/qml-qtquick-pointerdevice.html
    http://doc.qt.io/qt-5/qml-qtquick-pointerdevice.html

    For whatever reason whenever I try to create a PointerDevice type it gives me Unknown component (M300). I have tried importing both QtQuick 2.11 and QtQuick 2.7 but can't seem to get the error to go away. Any thoughts?

    PointerDevice {
            
    }
    
    raven-worxR 1 Reply Last reply
    0
    • J JrDeskJockey

      Hello. I was hoping to see if I could detect if the platform my app is running on contains a touch screen or not. I found this PointerDevice QML type in both the 5.10 and 5.11 documentation...
      https://doc.qt.io/archives/qt-5.10/qml-qtquick-pointerdevice.html
      http://doc.qt.io/qt-5/qml-qtquick-pointerdevice.html

      For whatever reason whenever I try to create a PointerDevice type it gives me Unknown component (M300). I have tried importing both QtQuick 2.11 and QtQuick 2.7 but can't seem to get the error to go away. Any thoughts?

      PointerDevice {
              
      }
      
      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @JrDeskJockey
      i never used it myself, but since it only provides 2 read-only properties my guess is that it is rather a singleton type.

      For example:

      switch( PointerDevice.type )
      {
          case DeviceType.Mouse:
               ....
               break;
      }
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2

      • Login

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