On 30.07.06 16:53:09, dave s wrote: > The debugged program raised the exception unhandled TypeError > "argument 1 of QListView.insertItem() has an invalid type" > > I have tried various arguments including (0, "hi test string") > > I have looked at the QT python bindings and it is fully implemented. I have > looked at QT 3 ref and a bit confused - its that C stuff.
AFAIK PyQt has it's own documentation also for version 3, which shouldn't contain any C-stuff. > void QListView::insertItem ( QListViewItem * i ) [virtual] > > Is '*' equivalent to a python ',' ? No "*" means "pointer to". This translates to a reference in python, i.e. the method signature in python is: insertItem(self, QListViewItem) so you need to provide a QListViewItem. However normally you'd just create a new QListViewItem with the QListView as parent and your text and be done with it. > PS Is QlistView the best widget for this job ? Well, QTextEdit has a log-mode IIRC, that might be easier to use. Andreas -- Your object is to save the world, while still leading a pleasant life. _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
