Allow icons to be loaded in the toolbar preferences for external plugins

This commit is contained in:
Kovid Goyal 2011-03-12 09:49:46 -07:00
parent 6b06c0606e
commit 6dcdd98ef4

View File

@ -55,6 +55,10 @@ class BaseModel(QAbstractListModel):
text = _('Choose library')
return QVariant(text)
if role == Qt.DecorationRole:
if hasattr(self._data[row], 'qaction'):
icon = self._data[row].qaction.icon()
if not icon.isNull():
return QVariant(icon)
ic = action[1]
if ic is None:
ic = 'blank.png'