Missing PointerDevice Type?
-
wrote on 2 Jul 2018, 16:05 last edited by
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.htmlFor 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 { }
-
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.htmlFor 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 { }
@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; }
1/2