[QGIS-Developer] Setting snapping settings via Python

Denis Rouzaud denis.rouzaud at gmail.com
Wed Jun 19 05:31:09 PDT 2019


QgsProject.instance().snappingConfigChanged
See
https://qgis.org/pyqgis/master/core/QgsProject.html#qgis.core.QgsProject.snappingConfigChanged

Le mer. 19 juin 2019 à 14:24, David Erill <daviderill79 at gmail.com> a écrit :

> I'm migrating a plugin to QGIS 3.x
> I have this line of code that works in previous versions:
> QgsProject.instance().snapSettingsChanged.emit()
>
> But I cannot find this signal anymore in the new API.
> I've been looking for another signal that does the same but didn't find.
> Anyone can tell me how can I achieve the same with the new API?
>
> Thanks
>
> Missatge de Laure-Hélène Bruneton <lbruneton at alcer.com> del dia dj., 8 de
> febr. 2018 a les 13:22:
>
>> Thank you so very much !!!
>>
>> QgsProject.instance().writeEntry('Digitizing', '/SnappingMode',
>> 'advanced')
>> QgsProject.instance().snapSettingsChanged.emit()
>>
>> This did the trick for me. I'm so surprised the answer wasn't easy to
>> find...
>>
>>
>>
>> --
>> Sent from:
>> http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190619/9fb9e354/attachment.html>


More information about the QGIS-Developer mailing list