QFileInfo vs QFile to test if a file is writable
问题 I'm using PyQt and I noticed strange behavior when testing my application with Windows (everything is working as expected with Linux). I have a file that I can read and write and I want to test it from the app: >>> from PyQt4.QtCore import QFile, QFileInfo >>> f1 = QFileInfo("C:\Users\Maxime\Desktop\script.py") >>> f2 = QFile("C:\Users\Maxime\Desktop\script.py") >>> f1.isWritable() True >>> f2.isWritable() False So it looks like QFile is wrong on that test case. But, on another file that is