Quote Originally Posted by georgep View Post
since I read on http://wiki.qtcentre.org/index.php?t...tractItemModel
that Qt::EditRole returns a string,
It returns a variant. The default delegate interprets it as a string later on. So you can return an int from this role and it will be displayed as a textual representation of the integer.

But the story isnt over, I still dont understand how to use QSqlTableModel 's delegates on my_model too
(i have a datetime type in mysql which automagically has a spinbox editor in QSqlTableModel )
I don't understand the problem. What is it exactly that you don't know?

Someone should further edit the wiki article with examples of the functions
Hmm... why don't you do it?