Detecting mounted drives on Linux and Mac OS X
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?
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