How to detect whether there is mouse input or touch input...



  • 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 ?



  • 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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.