Reputation: 1388
I need to hide the cursor when USB mouse is disconnected from the system, and show it when the mouse is connected. Any ideas how it can be done?
Upvotes: 1
Views: 903
Reputation: 4050
Qt itself does not provide such a module. There is a user-made class called QDeviceWatcher, you could give it a try.
If you are using QtEmbedded Linux, you have a folder with all USB devices info (vendor id, etc), probably in /proc/scsi/usb-storage
file. So you probably could use QFileSystemWatcher to handle modification in this folder.
See: Qt Centre Post for more detail.
Upvotes: 3