Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Multiple property change events in the same time ?
Alicemirror last edited by
Hi to all,
If I have a property that needs some trick when the value changes i.e. saving its new value somewhere the most reliable thing to do is to manage the assignement in a onPropertyChange: event.
What happens when I have 5 or 10 properties that should be managed? What I am asking is if there is a way to manage a single event including multiple properties so when at least one of these changes the event is fired and I can manage the changes as the program logic need.
The actual simple solution that I have found is to chain a couple of events in the following way:
// Set a global signal
// Set the default values for the properties
property string valueA: "aaa"
property string valueB: "bbb"
property string valueC: "ccc"
// When a property changes always the same signal is called
// js code to manage the values of the three properties, save them etc.
Is there a more efficient method ?