Apply Style QML
apply_style_qmlApply a QML style to a layer from a file or inline text, enabling rule-based renderers, data-defined properties, SVG fills, and blend modes. Invalid styles are rejected and prior style restored.
Instructions
Apply a QGIS QML style to a layer, from a file (path) or inline QML text (qml); pass exactly one. Use it for styles the other styling tools do not model (rule-based renderers, data-defined properties, SVG fills, blend modes). Rejected, with the previous style restored, if the XML is malformed, targets the other layer kind, or QGIS loads a different renderer than the QML declares. Tip: save_style_qml on a similar layer gives a template in this QGIS version's format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qml | No | ||
| path | No | ||
| layer_id | Yes |