
March 2nd, 2004, 07:29 PM
|
|
Contributing User
|
|
Join Date: Jan 2004
Posts: 84
Time spent in forums: 8 h 7 m
Reputation Power: 10
|
|
|
each item in the list is represented by an instance of the QListViewItem class. so you'll need to call a method of that class to see it's value. I can't remember the exact syntax as it's been a while since I did anything with PyQt, but using this:
print dir(w.listOptions.selectedItem())
will give you a list of all the attributes of that class. from there you should be able to find a method that does what you want. so selectedItem() does return the selected item, just that it's an instance of QListViewItem that you need to do further work with to get your data.
Last edited by rebbit : March 2nd, 2004 at 07:31 PM.
|