I would like to save the current "value" property of several components (e.g. a Slider) as a configuration profile when the user clicks on the Save button in my application. However, the Save button is in a different file than the rest of the components. How should I deal with this? Some solutions that I have thought:
- do a two-way binding between the "value" property of the component and a role in my model (by using Binding)
- reference every component by ID, even if they are in different QML files, in the onClicked handler in my Save button and save the data to the model
- make onClicked in my Save button to emit a signal that will be "caught" in every QML file, making the components commit their value to my model
Am I on the right track here?