Since Call PySide.QtCore.QSettings.endGroup() to reset the current group to what it was before the corresponding PySide.QtCore.QSettings.beginGroup()
-
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.settings.beginGroup("MainWindow")
self.resize(settings.value("size", QSize(400, 400)).toSize())
self.move(settings.value("pos", QPoint(200, 200)).toPoint())
self.settings.endGroup()
@ -
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
@[MainWindow]
size=nnn
pos=mmm@