This commit is contained in:
Jean-Francois Dockes 2021-08-31 10:13:54 +02:00
parent d5060a132c
commit ae3480eab4

View File

@ -407,6 +407,10 @@ QVariant RecollModel::data(const QModelIndex& index, int role) const
return m_cachedfont;
}
// Note that, because we use a style sheet, there is no way to dynamically set the background
// color. See: https://forum.qt.io/topic/95940/model-backgroundrole-overridden-by-style-sheet/
// https://bugreports.qt.io/browse/QTBUG-70100
if (!m_source || role != Qt::DisplayRole || !index.isValid() ||
index.column() >= int(m_fields.size())) {
return QVariant();