Hint a size for the delegate
This commit is contained in:
parent
e72bbfe1d2
commit
b1f6204c53
1 changed files with 2 additions and 0 deletions
|
@ -251,6 +251,8 @@ QVariant DevicesModel::data(const QModelIndex& index, int role) const
|
|||
|
||||
//This function gets called lots of times, producing lots of dbus calls. Add a cache?
|
||||
switch (role) {
|
||||
case Qt::SizeHintRole:
|
||||
return QSize(0, 32);
|
||||
case IconModelRole: {
|
||||
QString icon = data(index, IconNameRole).toString();
|
||||
return QIcon::fromTheme(icon);
|
||||
|
|
Loading…
Reference in a new issue