[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] PyQt4 bug bool(QComboBox())
From: Baz Walter <bazwal () ftml ! net>
Date: 2013-07-29 19:48:43
Message-ID: 51F6C71B.5090005 () ftml ! net
[Download RAW message or body]
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
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic