New answers tagged pyqgis-3
1
vote
Accepted
PYQGIS MapLayerComboBox filter on both layer type and field within layer
You can use the following approach which is to make use of the setExceptedLayerList() method of QgsMapLayerComboBox and pass a list of layers which will not be shown in the combo box.
The basic logic ...
1
vote
AutoFields Plugin for QGIS 3? Or best way to set up Default Values via PyQGIS?
Original Poster. Thanks @user2856 for calling out QgsDefaultValue and .setDefaultValueDefinition; I didn't know those existed. Below is what ultimately worked for me.
myLayers = [layer for layer in ...
2
votes
Accepted
PyQGIS 3 Select features by mouse click not working
For me, the instance of selectTool is deleted at the end of the start_line_edit function.
So try :
def start_line_edit(self):
print("button pushed")
self.t = selectTool(iface, self....
0
votes
QGIS 3.x closestSegmentWithContext returns sqrt distance 0.0 and point doesn't snap to polyline
You need to set the epsilon value of the closestSegmentWithContext function to a very low value for it to work with lat and long. The DEFAULT_SEGMENT_EPSILON is not low enough to test the values less ...
1
vote
Accepted
Rotating point objects toward lines using QGIS
I'm not sure if this will give you more satisfactory results than what you are currently using, but I had a play around with some test data and came up with the following script which you are welcome ...
Top 50 recent answers are included
Related Tags
pyqgis-3 × 750qgis-3 × 334
pyqgis × 303
qgis × 246
python × 121
qgis-plugins × 91
qgis-processing × 74
print-composer × 32
layers × 22
pyqt5 × 22
python-3 × 19
fields-attributes × 17
attribute-table × 16
postgis × 13
labeling × 13
raster × 12
standalone × 11
gdal × 10
symbology × 10
layouts × 10
geometry × 9
export × 9
style × 9
pyqt × 9
coordinate-system × 8