Add ImageItem.

This commit is contained in:
Black Hat
2018-09-06 16:22:00 +08:00
parent 75e2d6dbed
commit bd5c119f53
6 changed files with 146 additions and 9 deletions

View File

@@ -139,10 +139,8 @@ QVariant RoomListModel::data(const QModelIndex& index, int role) const {
MatriqueRoom* room = m_rooms.at(index.row());
if (role == NameRole) return room->displayName();
if (role == AvatarRole) {
if (room->avatarUrl().toString() != "") {
return room->avatarUrl();
}
return QVariant();
if (room->avatarUrl().toString() != "") return room->avatar(64, 64);
return QImage();
}
if (role == TopicRole) return room->topic();
if (role == CategoryRole) {