[PyKDE] QListView bugs
Hans-Peter Jansen
hpj at urpla.net
Mon Jul 1 12:01:01 BST 2002
On Mon, 01 Jul 2002 10:17:44 +0100
"Phil Thompson" <phil at river-bank.demon.co.uk> wrote:
> 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?
works fine with Python 2.1.1, PyQt 3.3rc2 and Qt 3.0.4, too.
> > Another (little) problem :
> > When you create a QListViewItem with None as parent, you get a
> > marvelous segfault
I cannot get any sense out of doing that. What's your intention?
> Do you have a script that demonstrates the problem?
>
> > Python : 2.1.1, Qt : 3.0.2, PyQt : 3.2.4
Doesn't PyQt 3.2.4 wants Qt 3.0.4 at least?
> > Linux Suse 72, kernel : 2.4.4
>
>
> Phil
Hans-Peter
More information about the PyQt
mailing list