[PyKDE] QListView bugs
Phil Thompson
phil at river-bank.demon.co.uk
Mon Jul 1 11:22:00 BST 2002
Thierry Jouve wrote:
> Hi,
>
> I have a curious bug with QListView...
>
> When I run :
>
> #!/usr/bin/env python
>
> from qt import *
>
> if __name__ == "__main__" :
>
> import sys
> qa = QApplication(sys.argv)
>
> lv = QListView()
> lv.addColumn("Items")
>
> qlvi1 = QListViewItem(lv, "Item1")
> qlvi2 = QListViewItem(lv, "Item2")
> qlvi3 = QListViewItem(lv, "Item3")
>
> lv.insertItem(qlvi1)
> lv.insertItem(qlvi2)
> lv.insertItem(qlvi3)
>
> lv.update()
> lv.triggerUpdate()
>
> print lv.findItem("Item1", 0, Qt.ExactMatch)
> print lv.findItem("Item2", 0, Qt.ExactMatch)
> print lv.findItem("Item3", 0, Qt.ExactMatch)
>
> lv.show()
>
> qa.setMainWidget(lv)
> qa.exec_loop()
>
>
> The second "findItem" call returns None... and it is always the second
> "findItem" call that returns None, even if items are created or inserted
> in different order... or if params of findItem are different...
Works fine for me with Python 2.2.1, PyQt 3.3rc2 and Qt 3.0.4. Anybody else?
> Another (little) problem :
> When you create a QListViewItem with None as parent, you get a
> marvelous segfault
Do you have a script that demonstrates the problem?
> Python : 2.1.1, Qt : 3.0.2, PyQt : 3.2.4
> Linux Suse 72, kernel : 2.4.4
Phil
More information about the PyQt
mailing list