[PyKDE] QListBoxItem.isSelected() does not exist
rasky at develer.com
Thu Mar 31 01:11:14 BST 2005
Jeffrey Barish <jeff_barish at earthlink.net> wrote:
> Here's one that I'm pretty sure is a bug. In the following complete
> code sample, the line that is commented out tests whether the
> listboxitem is selected. However, that line produces an
> AttributeError. The line above it works correctly, but according to
> the documentation selected() is obsolete.
Works for me:
>>> "isSelected" in dir(QListBoxText)
>>> "selected" in dir(QListBoxText)
I also tried a cut-down version of your sample and everything appears to work
>>> a = QApplication()
>>> l = QListBox(None)
>>> i = QListBoxText(l, "foo")
<built-in method isSelected of QListBoxText object at 0x008158A0>
Traceback (most recent call last):
File "<stdin>", line 1, in ?
>>> l.firstItem() is i
Which version of Qt/PyQt are you using?
More information about the PyQt