Hi devs, <br><br>there is a way to load an editable layer without editing capabilities?<br>I searched for a  setCapabilities() method, but nothing.<br>Reducing the layer capabilities would be useful, especially for plugins, obviously <br>

without adding new capabilities.<br><br>In a C++ plugin I can extend the concrete DataProvider class. <br>There is a way to do the same thing in a python plugin? Maybe creating a wrapper <br>to the layer dataProvider?<br>

<br>Something like:<br><br><span style="font-family: courier new,monospace;">class ReadOnlyProvider:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    def __init__(self, dataProvider):</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">        self.dataProvider = dataProvider</span><br style="font-family: courier new,monospace;"><br><span style="font-family: courier new,monospace;">    def select():</span><br style="font-family: courier new,monospace;">


<span style="font-family: courier new,monospace;">        return self.dataProvider.select()</span><br><br><span style="font-family: courier new,monospace;">    ...</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    def capabilities():</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">        return newCapabilites</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"></span><br>should work, but the QgsVectorLayer.setDataProvider method is private...<br>

<br>Do you know  other ways? Help is appreciated.<br>Thanks.<br><br>Cheers.<br clear="all"><br>-- <br>Giuseppe Sucameli<br>