found this thread and had the same problem (windows...)

Since Qt 5.4 you can use following:
http://doc.qt.io/qt-5/qstorageinfo.html#device

QByteArray QStorageInfo::device() const

Qt Code:
  1. Returns the device for this volume.
  2.  
  3. For example, on Unix filesystems (including OS X), this returns the devpath like [B]/dev/sda0[/B] for local storages.
  4. On Windows, it returns the UNC path starting with [B]\\\\?\\ [/B]for local storages (in other words, the volume GUID).
To copy to clipboard, switch view to plain text mode 

For example:

Qt Code:
  1. bool bLocalDrive = false;
  2. QStorageInfo storage(qApp->applicationDirPath());
  3. /*
  4.   storage.device() returns the device for this volume.
  5.   For example, on Unix filesystems (including OS X), this returns the devpath like /dev/sda0 for local storages.
  6.   On Windows, it returns the UNC path starting with \\\\?\\ for local storages (in other words, the volume GUID).
  7.   */
  8. QByteArray qbaPath = storage.device();
  9. #ifdef Q_OS_WIN
  10. if (qbaPath.startsWith("\\\\?\\"))
  11. bLocalDrive = true;
  12. #else
  13. if (qbaPath.startsWith("/dev/sda0"))
  14. bLocalDrive = true;
  15. #endif
To copy to clipboard, switch view to plain text mode