Ref T190, improved display of text messages

* tooltip
* using QStringBuilder
This commit is contained in:
Klaus Basan
2017-11-13 01:51:56 +01:00
parent c2eeff6193
commit d4b4b48a55
5 changed files with 27 additions and 8 deletions

View File

@@ -81,5 +81,15 @@ namespace BlackGui
}
}
QVariant CTextMessageListModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::ToolTipRole)
{
// the underlying model object as summary
const CTextMessage model(this->at(index));
return model.asHtmlSummary("<br>");
}
return CListModelBase::data(index, role);
}
} // namespace
} // namespace