Class: QgsSvgSelectorListModel¶
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.
Class Hierarchy¶
Base classes¶
- class qgis.gui.QgsSvgSelectorListModel[source]¶
Bases:
QAbstractListModel
- __init__(parent: QObject | None, iconSize: int = 30)
Constructor for QgsSvgSelectorListModel. All SVGs in folders from the application SVG search paths will be shown.
- Parameters:
parent (Optional[QObject]) – parent object
iconSize (int = 30) – desired size of SVG icons to create
- __init__(parent: QObject | None, path: str | None, iconSize: int = 30)
Constructor for creating a model for SVG files in a specific path.
- Parameters:
parent (Optional[QObject]) – parent object
path (Optional[str]) – initial path, which is recursively searched
iconSize (int = 30) – desired size of SVG icons to create