I can easily manipulate data in the QTableView cells with :
model->setDate(index, "somestring")
model->setDate(index, "somestring")
To copy to clipboard, switch view to plain text mode
but I can't change other properties, like background color or smth:
model
->setData
(model
->index
(1,
2) ,
QColor(Qt
::blue), Qt
::BackgroundColorRole);
model->setData(model->index(1,2) , QColor(Qt::blue), Qt::BackgroundColorRole);
To copy to clipboard, switch view to plain text mode
- doesn't work
it appears that only default role (Qt::EditRole) works for me in setData... is that's what's supposed to be or I am missing something?
Bookmarks