src/model.cpp

changeset 158
5bd755eaa5a8
parent 153
2f79053c2e9a
child 159
1a04364d20b5
--- a/src/model.cpp	Sat Mar 05 00:51:23 2022 +0200
+++ b/src/model.cpp	Sat Mar 05 12:42:14 2022 +0200
@@ -79,6 +79,8 @@
 	const ldraw::Object* object = (*this)[index.row()];
 	switch(role)
 	{
+	case Qt::DecorationRole:
+		return QPixmap{object->iconName()}.scaledToHeight(24);
 	case Qt::DisplayRole:
 		return object->textRepresentation();
 	case Qt::ForegroundRole:

mercurial