Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Python bindings for QGIS 3.
5
votes
Using the advanced filter of an attribute table from python
Either
You can pass the expression string directly to the selectByExpression() method of your QgsVectorLayer instance like this:
self.layer.selectByExpression('"STATUS" = \'OK\'')
u'...' is not ne …
2
votes
Accepted
Format Query statement for use in Virtual Layer query from PyQGIS
In your query= line you are creating a tuple, not a string as required. Try replacing the , with + and use layer.name() as allready suggested:
query = "Select " + current_field + ", count(*) from " + …
4
votes
Filter layer by FID with PyQGIS
Perhaps the strategy is promising to first obtain the unique identifier column for your source layer (on the data provider side) and then filter for the attribute values in this column, in your exampl …
5
votes
Accepted
Definition of OUTPUT parameter in PyQGIS 3 processing algorithms
I just stumbled upon a code snippet in https://anitagraser.com/2018/03/24/revisiting-point-polygon-joins/ that solved my issue. This indicates that the string 'memory:' is one possible valid value for …
3
votes
How to change form content dynamically in QGIS 3.6
The following works:
from PyQt5.QtWidgets import QLineEdit, QWidget
def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QLineEdit, "id") #works wit …
8
votes
Accepted
Output layer from PyQGIS 3 processing script is empty
After some reasearching I found that the key problem seems to be that you first defined sink
(sink, dest_id) = self.parameterAsSink( ...
and later on overwrite it with the result of processing.run. …