[PyQt] PyQt-4.5 KConfigGroup incompatibility problem?

Demetrius Cassidy dcassidy36 at mass.rr.com
Sun Jul 19 19:32:11 BST 2009


Use 4.5.1 instead of 4.5.2 for now. I think there is a problem with QVariant
in 4.5.2, as I've had nothing but issues in that it seems to always return a
QVariant when you call any of it's methods.

I sent an email about this not long ago.


Bugzilla from wbsoft at xs4all.nl wrote:
> 
> 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
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 

-- 
View this message in context: http://www.nabble.com/PyQt-4.5-KConfigGroup-incompatibility-problem--tp24559422p24559612.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list