Status message model with tooltip

This commit is contained in:
Klaus Basan
2018-10-27 23:46:55 +02:00
parent 541fd4bd61
commit a543ac89ae
2 changed files with 15 additions and 1 deletions

View File

@@ -67,5 +67,16 @@ namespace BlackGui
break;
}
}
QVariant CStatusMessageListModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::ToolTipRole)
{
// the underlying model object as summary
const CStatusMessage msg(this->at(index));
return msg.toHtml();
}
return CListModelTimestampObjects::data(index, role);
}
} // namespace
} // namespace