Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to detect whether there is mouse input or touch input...
kaziwaseef last edited by
My app will work on the desktop, tablet and phone. The UI will be selected accordingly. To differentiate between PC and touch device, I need to know whether a mouse is connected to the system or not. How do I do this in Qt 5 ?
mcosta last edited by
I think you can't know this using pure Qt code; you should try one of theese techniques
Use the Q_OS_* defines to check the platform of compilation
Use custom preprocessor defines