Get a List of Removable Devices [Win]

  • Hi,

    is it possible to get the information if a device, like an USB stick, is an removeable device? Actually i get a list of all drives by using


    but is it possible to filter the result, to only display USB- stick or hardrives?

    Thanks for your help.

  • I don't think there is embedded in Qt but other specific libraries can do it easily.
    for example, libusb has libusb_get_device_list()

  • Could solve the Problem using WinAPI.

    Just include


    and use the

    "UINT GetDriveTypeA(LPCSTR rootpath)" 

    funktion to get the drive Type.

    Reference on MSDN

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.