settings beginGroup self __section__ for key value in self defaults it

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
settings.beginGroup(self.__section__)
for key, value in self.defaults.iteritems():
if not settings.contains(key):
if key == 'shortcuts':
settings.beginGroup('shortcuts')
for shortName, shortData in value.iteritems():
settings.beginGroup(shortName)
for shortOptName, shortOptVal in shortData.iteritems():
settings.setValue(shortOptName, QVariant(
shortOptVal))
settings.setValue
settings.endGroup()
settings.endGroup()
settings.setValue(key, QVariant(value))