Hi,
For my first custom editor, like to implement a star-rating widget (similar to the one in http://doc.trolltech.com/4.5/itemvie...rdelegate.html) as part of a dialog. The widget is for collecting numerical info, and technically, I could use a QComboBox instead. However, I wanted something that looked nicer and used one less click than a QComboBox.
I was wondering, is a full-fledged model/view-delegate approach needed? Trolltech's example (the StarDelegate class) requires the passing of QStyleOptionViewItem, QAbstractItemModel, and QModelIndex, which feels excessive (at first glance, at least) for the selection and display of one number. Is it a good idea to just pass the value between the viewer and the editor? If so, are there any classes that help me to make a simpler implementation?
Any advice would be much appreciated, thanks!



Reply With Quote


But I didn't for 3 reasons: i) I was wondering if the complete model/view architecture was too complex for the simple widget I wanted. ii) I'm still not sure under what licence I want to release my program, so I thought it's best not to copy Nokia's code. iii) This is also a learning project, so I wanted to build my own stuff. Thanks for the suggestion, nonetheless!

Bookmarks