Qt 6.11 is out! See what's new in the release
blog
Detecting mounted drives on Linux and Mac OS X
General and Desktop
2
Posts
2
Posters
1.4k
Views
1
Watching
-
I’m using QDir::drives() to get the list of drives. It works great on Windows, but on Linux and Mac it only returns a single item “/”, i. e. root. It is expected behavior, but how can I get a list of drives on Mac and Linux?
-
Hi,
Yes it is expected. You can find it in "QDir's documentation":http://qt-project.org/doc/qt-4.8/qdir.html#drives
You might be interested in the usage of KDE's "solid" library for that