Skip to content

Instantly share code, notes, and snippets.

@mbroadst
Created January 25, 2013 18:38
Show Gist options
  • Save mbroadst/4636780 to your computer and use it in GitHub Desktop.
Save mbroadst/4636780 to your computer and use it in GitHub Desktop.
import QtQuick 1.0
Item {
property string key // settings.network.test
property QtObject dataSource // testData
property Item uiElement // nameField
property string uiElementProperty // "text"
property Component uiElementValue // namedField.text
// changes from C++ -> QML
Binding { target: uiElement; property: uiElementProperty; value: dataSource[key] }
// changes from QML -> C++
Binding { target: dataSource; property: key; value: uiElementValue }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment