[PyKDE] Moving items in QListView up / down > How?
Michael Zimmermann
mz-list at incunabulum.de
Mon May 30 09:10:46 BST 2005
Hi there,
just stumbled into the following problem. And try as I might I can't
find a reason for the errors I get. Anyone willing to help?
In a QListView I have a set of entries. Now I want to allow the user to
sort (reorder) these entries.
What I did was as follows:
1) In the class initialization:
self.listview.setSorting(-1, False) > disable sorting
2) To move an entry:
sel = self.listview.selectedItem()
sel.moveItem(sel.itemAbove())
The first one gives:
AttributeError setSorting
#2 gives:
AttributeError moveItem
If I look at the methods available for QListView and QListViewItem
neither setSorting() nor moveItem() are shown.
What is wrong here?
(PyQt 3.13 installed from source; python 2.3.4; linux)
--
cu,
Michael
---------------------------
| mz-list at incunabulum.de |
--------------------------
More information about the PyQt
mailing list