There are several ways to do this based on scoping rules. One solution is for instance to share root properties that your text fields update when modified or accepted.
import QtQuick.Controls 1.1
import QtQuick 2.1
Item {
width: 500
height: 500
property string typeResult
Label {
y: 200
id: saveBtn
text: "Text field is now " + typeResult
}
TabView {
Component.onCompleted: { addTab("Type", typeComoponent); }
Component {
id: typeComoponent
GroupBox{ TextField { anchors.centerIn: parent ; onTextChanged: typeResult = text} }
}
}
}
↧