[PyQt] QVariant bug in 4.4.3 and 4.4.4

Albert Cervera i Areny albert at nan-tic.com
Sun Jan 25 22:25:37 GMT 2009


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)".

-- 
Albert Cervera i Areny
http://www.NaN-tic.com


More information about the PyQt mailing list