Created
February 25, 2020 16:04
-
-
Save estan/847ebb6a3bd7114daa4df1874ef894b9 to your computer and use it in GitHub Desktop.
Pass object + property name into custom editor?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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