[PyQt] QVariant bug in 4.4.3 and 4.4.4

Phil Thompson phil at riverbankcomputing.com
Tue Jan 27 11:35:14 GMT 2009


On Sun, 25 Jan 2009 23:25:37 +0100, Albert Cervera i Areny
<albert at nan-tic.com> wrote:
> I've found a bug in both PyQt 4.4.3 and 4.4.4, though the bug differs in
> those 
> two versions it works correctly with 4.4.2.
> 
> Running the code below under 4.4.3 returns an empty list:
> 
> from PyQt4.QtCore import QVariant
> QVariant( [ QVariant( 1 ) ] ).toList()
> 
> Under 4.4.4 it returns a list with one element but:
> 
> from PyQt4.QtCore import QVariant
> QVariant( [ QVariant( 1 ) ] ).toList()[0].toInt()
> 
> Returns "(0, False)". Which is, of course, not correct and should be "(1,

> True)".

Thanks - this will be fixed in PyQt v4.5.

Phil


More information about the PyQt mailing list