Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
Since Call PySide.QtCore.QSettings.endGroup() to reset the current group to what it was before the corresponding PySide.QtCore.QSettings.beginGroup()
redstoneleo last edited by
Since Call PySide.QtCore.QSettings.endGroup() to reset the current group to what it was before the corresponding PySide.QtCore.QSettings.beginGroup() call.
So the following code does nothing ,right ? Perhaps I made some understanding mistake？（please clear it to me ）
@ def readSettings(self):
self.settings = QSettings("Moose Soft", "Clipper")
self.resize(settings.value("size", QSize(400, 400)).toSize())
self.move(settings.value("pos", QPoint(200, 200)).toPoint())
INeedMySpace last edited by
Check the code that write your settings. Settings are "tree" like structure. Group is a node, settings are leaves. If you execute .beginGroup() - you are inside "MainWindow", when you execute .endGroup() you leave this node and are on the level before "MainWindow" and can read settings on this level or open groups there.
Your code reads 2 settings from "MainWindow" group which should be on main level. If you change to .ini file settings your ini file should look like