How to get USB device name and its relative mount point?
Hello every one, this is my first topic on this forum that looks very nice.
i would like to know how can i get the list of usb devices connected (i mean /dev/sd**) and their relative mount points (/media/user/USB for example)
I need to put them in a QComboBox;
i heard about libusb but after hours i still can't figure out how to get theese informations and how to convert them into a QStringList
My program must works on both windows and linux but on Windows i need only the drive letter.
Thank you for your help!
In Linux you could just parse /proc/mounts.
Yes but how can i get only the removable devices?
Since you're on linux, did you took a look at KDE's Solid library ?
hi, thank you for your answer,
I didn't know that library so i've read this: https://techbase.kde.org/Development/Tutorials/Solid/Device_Discovery and to be honest it seems to be exactly what i need.
But i can't see how to use it:
LIBS += -lkdeui
to use kde classes but how can i add solid?
i can't find any documentation on how to use this lib in my QT, project