[PyQt] PyQt4 bug bool(QComboBox())
Baz Walter
bazwal at ftml.net
Mon Jul 29 20:48:43 BST 2013
On 29/07/13 17:52, Sebastian Sauer wrote:
> >>> 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?
>>> len(c)
0
>>> c.addItem('foo')
>>> len(c)
1
>>> bool(c)
True
--
Regards
Baz Walter
More information about the PyQt
mailing list