QT USB support
-
I am looking for a simple way in qt to determine if a usb device is in use (stick is inserted, stick is pulled).
Starting point is visual studio, qt 6.4.3 and qt vs tools.
Target system is windows and linux.
What i found so far is an old git project, QDeviceWatcher.
But is there any possibility to solve this with QT on-board tools (QSerialPort or similar)?
-
@astoffregen said in QT USB support:
if a usb device is in use
on-board tools (QSerialPort or similar)?
So what usb device to you want to watch? A disk or a serial device?
-
@astoffregen said in QT USB support:
if a usb device is in use
https://forum.qt.io/topic/135835/qt-desktop-usb-device-pluged-unpluged-detection-based-on-pid-vid/6
-
@Christian-Ehrlicher An usb stick
-
Hi,
@astoffregen said in QT USB support:
@Christian-Ehrlicher An usb stick
This likely means a storage device but a USB stick can be:
- Storage
- Bluetooth dongle
- WiFi dongle
- Serial port
etc.
Depending on your exact needs, KDE's Solid framework might be of interest.