如何TextInput
在 qml 中将一个分配给一个 int?
int new_span_seconds
TextInput {
id: editor
width: 80
height: 17
color: "white"
font.bold: true; font.pixelSize: 14
text: "21"
horizontalAlignment: TextInput.AlignHCenter
}
Keys.forwardTo: [ (returnKey), (editor)]
Item {
id: returnKey
Keys.onReturnPressed: new_span_seconds = editor. <<< ? >>>
Keys.onEnterPressed: new_span_seconds = editor. <<< ? >>>
}