Main goal: have a context property that is set by a item defined into a QML file (say file_1.qml), and which will be accessed at runtime by other item defined in a different QML file (say file_2.qml).
Question: Is it possible to set a new context property in file_1.qml and then read this property in file_2.qml?
(edit)
For example, I would need to use a value from file_2.qml in file_1.qml:
file_1.qml:
(...)
UiController.but_generate__onClicked(
getContextProperty("sbx_money_quantity_value"),
cal_daysoff.visibleMonth)
(...)
file_2.qml:
(...)
SpinBox {
id: sbx_money_quantity
objectName: "sbx_money_quantity"
Layout.fillWidth: true
minimumValue: 0
maximumValue: 100000
value: 20000
onChanged: setContextProperty("sbx_money_quantity_value",value)
}
(...)
Thanks!