Set colours in the model by using setData() and Qt::BackgroundColorRole or Qt::TextColorRole depending on which colour you want to change.
Set colours in the model by using setData() and Qt::BackgroundColorRole or Qt::TextColorRole depending on which colour you want to change.
But how do I get the required QModelIndex?
Using QAbstractItemModel::index().
Bookmarks