Take the 2-minute tour ×  I am working on python plugins for
QGIS.I developed the plugins same as RT SQL LAYER plugins.  When
we draw the layers using query builder of "Add Postgis Layer"
option,toggle editing option is available for the same.  But
when i try to draw layers using RT SQL LAYER plugin ,it is not
available for editing. Same happens with my plugins too.  How do
I make toggle editing option available for my plugins.?? My
plugins are in python.  share|improve this question add comment
2 Answers  up vote 2 down vote accepted  The query builder just
sets a subset string via QgsVectorLayer::setSubsetString() on
the layer (also changeable later in the layer properties or via
"Query" in the layer context menu).  In the postgres provider
case this can be an arbitrary complex where clause and the layer
remains editable.  RT layer however creates an layer from an
arbitrary complex query, which is not updateable and therefore
can't be edited.  share|improve this answer add comment  In RT
SQL Layer, it is p