QGIS API provides QgsExpressionContextUtils to set project properties.

But in the class, there isn't any signal.

I hope to connect to a signal whenever some of the properties were changed.

So is there a way to implement this?

enter image description here

1 Answer 1


Yes, there is a way. It's the customVariablesChanged signal from QgsProject.

def my_slot():
    print("A project variable was just changed!")


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.