New answers tagged pyqgis-3
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#...
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(), ...
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....
Top 50 recent answers are included
Related Tags
pyqgis-3 × 770qgis-3 × 339
pyqgis × 309
qgis × 258
python × 124
qgis-plugins × 92
qgis-processing × 72
print-composer × 32
layers × 23
pyqt5 × 23
fields-attributes × 20
python-3 × 19
attribute-table × 17
labeling × 15
postgis × 12
standalone × 12
raster × 11
layouts × 10
gdal × 9
symbology × 9
geometry × 9
style × 9
vector-layer × 9
pyqt × 9
coordinate-system × 8