[PyQt] PyQt4 bug bool(QComboBox())

Sebastian Sauer mail at dipe.org
Mon Jul 29 17:52:48 BST 2013


Aloha,

following interesting bug(?) I run into:

 >>> from PyQt4 import QtGui, QtCore
 >>> import sys
 >>> app = QtGui.QApplication(sys.argv)
 >>> c = QtGui.QComboBox()
 >>> c
<PyQt4.QtGui.QComboBox object at 0x83001dc>
 >>> isinstance(c,QtCore.QObject)
True
 >>> bool(c)
False

That, bool(c) returns False, is not expected or wanted or is it?

p.s. thanks for the great work Phil & PyQt community :)



More information about the PyQt mailing list