小编use*_*174的帖子

如何在qml中将TextInput分配给int?

如何TextInput在qml中将in 分配给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. <<< ?  >>>
    }
Run Code Online (Sandbox Code Playgroud)

qt textinput qml qt-quick

3
推荐指数
1
解决办法
5606
查看次数

标签 统计

qml ×1

qt ×1

qt-quick ×1

textinput ×1