Skip to content

Instantly share code, notes, and snippets.

@estan
Created February 25, 2020 16:04
Show Gist options
  • Save estan/847ebb6a3bd7114daa4df1874ef894b9 to your computer and use it in GitHub Desktop.
Save estan/847ebb6a3bd7114daa4df1874ef894b9 to your computer and use it in GitHub Desktop.
Pass object + property name into custom editor?
//
// In this example, there's a root context property `machine`
// available, which has properties `depthFrom` and `depthTo`,
// which the FloatEditors below are supposed to control.
//
// How would I pass that information (`machine` + the name of
// the property) into each FloatEditor instance?
//
SomeWhereInMyApp {
Text {
text: "Depth From (m):"
}
FloatEditor {
id: fromDepthEditor
}
Text {
text: "Depth To (m):"
}
FloatEditor {
id: toDepthEditor
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment