How can I create a custom editor in my view?

You can create a delegate and set it on the view using setItemDelegate() [qt.nokia.com]. A delegate [doc.qt.nokia.com] allows the way items of data are rendered and edited to be customized.

Alternatively you can use QItemEditorCreatorBase [qt.nokia.com].

See the spinboxdelegate [doc.qt.nokia.com] example for a demonstration on how to implement your delegate.

No comments

Write a comment

Sorry, you must be logged in to post a comment.