New answers tagged

0 votes

Change Stroke Style of a Simple fill Symbol Selector with PyQGIS

setStrokeStyle doesn't work for me, but symbol.symbolLayer(0).setPenStyle(Qt.PenStyle(Qt.NoPen)) works. See: https://api.qgis.org/api/3.22/classQgsSimpleLineSymbolLayer.html#...
NIAMPA Hamidou's user avatar
0 votes

"QgsVectorFileWriter.writeAsVectorFormat(): arguments did not match any overloaded call" in PyQGIS

If you are using a 3.0+ version of QGIS then you will have to change writeAsVectorFormat to writeAsVectorFormatV2, which means you are going to need new parameters(transformContext(), ...
Iasonas Chraniotis's user avatar
1 vote

Changing widget type of field by using PyQGIS

@user117572 answered to his/her own question: I found a solution which works: setup = QgsEditorWidgetSetup('ValueMap', {'map': {u'Description 1': u'value1', u'Description 2': u'value2'}}) layer....
Taras's user avatar
  • 31.4k

Top 50 recent answers are included