QSettings(): How to save to current working directory

倾然丶 夕夏残阳落幕 提交于 2019-12-03 14:19:35
alexisdm

You can use that overload class QSettings(fileName, format[, parent=None]) like this:

self.settings = QSettings("__settings.ini", QSettings.IniFormat)

If the path is relative, the file will already be opened in the current working directory, but that may not be what you want.
You may try one of these answers to use the directory where the script is instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!