I suspect you can't do that with Qt. You'll need to add custom code for each target platform.
However, you can simply try to create an empty file and then immediately delete it. If creating the file fails then the volume is likely read only (or it has ran out of free space, you'll need to check the error codes to be sure).