mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow icons to be loaded in the toolbar preferences for external plugins
This commit is contained in:
parent
6b06c0606e
commit
6dcdd98ef4
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user