Is there a way to enable or disable topological editing with python in QGIS? I'm trying to set a bunch of rules, one of them being the editing, when starting up a project, but I can't seem to find how to enable this. For that matter, there's even no


enter image description here

1 Answer 1


You can do the following to enable snapping and then topological editing (it happens at QgsProject level):

new_conf = QgsSnappingConfig(QgsProject.instance().snappingConfig())

You may also look at this related question How to enable/disable snapping functionality with PyQGIS? that mention QgsSnappingUtils class to ease manipulation of snapping editing configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.