[PyKDE] Searching in a list of strings

Janos Blazi jblazi at gmx.de
Thu May 30 10:55:00 BST 2002


I have a QListView containing up to 100,000 entries. Now I should like
to implement some sort of search: The strings in the list view should be
compared against an entered user string and only those strings in the
list view, that contain the user string, should be shown.

How can I do this?

I thought, I should create an QListViewItemIterator and looking at the
items in the QListView. But then, if I do the comparing in Python, I
shall have to convert the QStrings back to Python strings and that will
be very, very slow.
Any hints, how to do this *as fast as possible*?

TIA,

--
Janos Blazi







More information about the PyQt mailing list