in my_model::data I added a:
since I read on http://wiki.qtcentre.org/index.php?t...tractItemModelQt Code:
if(role== Qt::EditRole ) { }To copy to clipboard, switch view to plain text mode
that Qt::EditRole returns a string, and now upon doubleclick the values "stay" in the cell.
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 )
Someone should further edit the wiki article with examples of the functions
Bookmarks