Listing drives of a certain type (usb, network, fixed hard drives)
-
Hi,
I have a (windows) program in which I like to list the USB drives that are attached. I like to keep it OS independent (if possible), but that is not a requirement
@ aInfoList = aDir.drives();
for (i = 0; i < aInfoList.count(); i++)
{
/ * need something like
if (aInfoList.at(i).drivetype == USB_DRIVE)
*/
ui->comboBoxDrives->addItem(aInfoList.at(i).absoluteFilePath(), Qt::DisplayRole);
}@Is this possible?
-
Hi,
I think there's no way to do this in OS indepentent way.
Probably you should use native API -
Hi,
There's KDE's solid library that might help
-
Did a bit of looking around. QSystemStorageInfo of Qt Mobility seems to have the functionality I need. I just need to figure out how to make it work on windows.
-
Hi,
At the moment QtMobility is not parto of Qt standard package. I don't know if is still mantained
-
AFAIK, some parts of QtMobility have been moved to Qt but not all