Hi All
I am trying to configure a renderer with a marker line in python. Currently it
is killing QGIS with seg fault. Running recent dev build or 3.8.4 on ubuntu
18.04.
Below is the code I am running in python console which crashes QGIS. Any ideas
as to what I am doing wrong?
Thanks in advance
Chris
#!/usr/bin/python3
from qgis.core import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
def tryit():
basePointSymbol = QgsMarkerSymbol.createSimple({})
basePointLine = QgsMarkerLineSymbolLayer()
basePointLine.setPlacement(QgsMarkerLineSymbolLayer.FirstVertex)
basePointLine.setSubSymbol(basePointSymbol)
symbol=QgsLineSymbol([basePointLine])
renderer = QgsSingleSymbolRenderer(symbol)
layer=iface.mapCanvas().currentLayer()
layer.setRenderer(renderer)
layer.triggerRepaint()
tryit()
________________________________
This message contains information, which may be in confidence and may be
subject to legal privilege. If you are not the intended recipient, you must not
peruse, use, disseminate, distribute or copy this message. If you have received
this message in error, please notify us immediately (Phone 0800 665 463 or
[email protected]) and destroy the original message. LINZ accepts no
responsibility for changes to this email, or for any attachments, after its
transmission from LINZ. Thank You.
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer