think we misread what you were trying to do earlier...I do see where you pulled the example for that.
For that, I would suggest going with QListWidget instead. It has built in support for item selection and stuff like that and is built especially for that. Overload the QListWidget to create a custom widget and overwrite those member classes in your custom QListWidget.
I don't know if that ui_widget has that slot or not because I've never messed with the edytor library.
http://docs.huihoo.com/pyqt/pyqt4/html/qlistwidget.html
Also, I would use addItem instead of addItems for adding 1 item. Probably incurs less overhead.
And if you go to that link and go up 1 folder, it has all the Qt classes that Trolltech provides documentation before except the documentation is for Python and PyQt. Enjoy.![]()




Reply With Quote
Bookmarks