I have a QQuickItem in C++ which is instantiated in a QML application. I want to trigger a custom function on the c++ side if the width property of my QQuickItem changes.

In QML I would do onWidthChanged: { my code}. How can I do this on the c++ side?