Perhaps you should use QDir::drives()?