Class: QgsSvgSelectorListModel

class qgis.gui.QgsSvgSelectorListModel(parent: QObject, iconSize: int = 30)

Bases: PyQt5.QtCore.QAbstractListModel

Constructor for QgsSvgSelectorListModel. All SVGs in folders from the application SVG search paths will be shown.

Parameters:
  • parent – parent object
  • iconSize – desired size of SVG icons to create

QgsSvgSelectorListModel(parent: QObject, path: str, iconSize: int = 30) Constructor for creating a model for SVG files in a specific path.

Parameters:
  • parent – parent object
  • path – initial path, which is recursively searched
  • iconSize – desired size of SVG icons to create

A model for displaying SVG files with a preview icon. Population of the model is performed in a background thread to ensure that initial creation of the model is responsive and does not block the GUI.

beginInsertColumns()
beginInsertRows()
beginMoveColumns()
beginMoveRows()
beginRemoveColumns()
beginRemoveRows()
beginResetModel()
changePersistentIndex()
changePersistentIndexList()
childEvent()
connectNotify()
createIndex()
customEvent()
data(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any
decodeData()
disconnectNotify()
encodeData()
endInsertColumns()
endInsertRows()
endMoveColumns()
endMoveRows()
endRemoveColumns()
endRemoveRows()
endResetModel()
isSignalConnected()
persistentIndexList()
receivers()
resetInternalData()
rowCount(self, parent: QModelIndex = QModelIndex()) → int
sender()
senderSignalIndex()
timerEvent()