Hi!
I am experimenting with a subclass of QSqlQueryModel. Since I wanted to change the background color in the ListView, I reimplemented the data method
Qt Code:
{ if( role == Qt::BackgroundColorRole ) { return Qt::green; } else if( role == Qt::DisplayRole ) { return record( item.row() ).value( item.column() ); } }To copy to clipboard, switch view to plain text mode
This works for setting the background color, but fails in displaying the data.
What am I missing here?
//John
Bookmarks