[Qgis-developer] setSubSymbol causes QGis crash

Christophe Damour sigeal at sigeal.com
Mon Nov 16 06:05:43 PST 2015


Hi,

I am having problems creating a multilayer line symbol with this code :

         symbol = QgsLineSymbolV2.createSimple({})
         symbol.deleteSymbolLayer(0)

         symbolLine = QgsSimpleLineSymbolLayerV2()
         symbol.appendSymbolLayer(symbolLine)

         symbolArrow = QgsMarkerSymbolV2.createSimple({})
         symbolArrow.deleteSymbolLayer(0)

         symbolArrowLayer = QgsSimpleMarkerSymbolLayerV2()
         symbolArrow.appendSymbolLayer(symbolArrowLayer)

         symbolLineArrow = QgsMarkerLineSymbolLayerV2()
         symbolLineArrow.setSubSymbol(symbolArrow) # Causes crash !!!

         symbol.appendSymbolLayer(symbolLineArrow)

Is there something wrong in this code ?
Has anybody already had this issue ?

Thank for helping,

-- 
Christophe




More information about the Qgis-developer mailing list