[PyQt] PyQt-4.5 KConfigGroup incompatibility problem?
Wilbert Berendsen
wbsoft at xs4all.nl
Sun Jul 19 19:07:21 BST 2009
Hi!
Since PyQt4.5, a call to a KConfigGroup.readEntry always returns a QVariant:
>>> config = KGlobal.config().group('blaat').group('blaat')
>>> r = config.readEntry('blaat', 'bla')
>>> r
PyQt 4.4.3 shows: PyQt4.QtCore.QString(u'bla')
PyQt 4.5 shows: <PyQt4.QtCore.QVariant object at 0x84b1b6c>
to keep my program working in both PyQt 4.4 and 4.5 should I change every call
to:
>>> r = config.readEntry('blaat', QVariant('bla')).toString()
?
Many thanks for an enlightening answer,
Wilbert Berendsen
--
http://www.wilbertberendsen.nl/
"You must be the change you wish to see in the world."
-- Mahatma Gandhi
More information about the PyQt
mailing list