how to monitor TextEdit's value in plasma qml?
Marco Martin
notmart at gmail.com
Sat Jul 20 11:31:43 UTC 2013
On Friday 19 July 2013, Bruce Ouyang wrote:
> in html, textedit element has an onChange attribute for monitoring its
> value change. plasma qml doesn't. how can i achieve this purpose?
As Aaron said, you can manage it monitoring on<PropertyName>Changed, by either
implementing it in the same element
Text {
text: "foo"
onTextChanged: {
//doSomething
}
}
or with the Connections element:
http://qt-project.org/doc/qt-4.8/qml-connections.html
or,if you just want another property to be synced (and this is the mayority of
cases, really)
Text {
id: text1
text: "foo"
}
Text {
id: text2
text: text1.text
}
--
Marco Martin
More information about the Plasma-devel
mailing list