Custom Qt USB FileSave dialog
-
Hi,
I need a Qt FileSave dialog with a list of USBs attached to the system. It'll also need a mount feature so the USBs are mounted at a specified location. It must mount USBs, display and navigate only the USBs storage.
My first approach was parsing the output of a Linux USB system command using QProcess. Then using a Linux mount command to mount the device and capture success or failure.
Is there a more feasible way to do this using the Qt framework on Linux?
--James S.
-
Hi,
I need a Qt FileSave dialog with a list of USBs attached to the system. It'll also need a mount feature so the USBs are mounted at a specified location. It must mount USBs, display and navigate only the USBs storage.
My first approach was parsing the output of a Linux USB system command using QProcess. Then using a Linux mount command to mount the device and capture success or failure.
Is there a more feasible way to do this using the Qt framework on Linux?
--James S.
Perhaps look into the Qt D-Bus module if D-Bus is available on your target platform. The
org.freedesktop.UDisks2
system bus service looks of interest. Qt providesqdbus
andqdbusviewer
to help dig around in this world, and there is alsodbus-monitor
.I am not familiar enough with how this works to help further.
It'll also need a mount feature so the USBs are mounted at a specified location.
Mounted at a user-specified location or a known, fixed location (i.e. specified by the
/etc/fstab
file)?
Any arbitrary USB drive or only known USB devices?
Mounting could be done withsudo
and a suitably restrictive sudoers file but you need to think about the security implications.