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?
Forum Update on Monday, May 27th 2025

Missing PointerDevice Type?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 352 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.
  • J Offline
    J Offline
    JrDeskJockey
    wrote on 2 Jul 2018, 16:05 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 {
            
    }
    
    R 1 Reply Last reply 3 Jul 2018, 06:59
    0
    • J JrDeskJockey
      2 Jul 2018, 16:05

      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 {
              
      }
      
      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 3 Jul 2018, 06:59 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

      1/2

      2 Jul 2018, 16:05

      • Login

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