spinbox direct input in iOS/android?



  • I'm using a spinbox in an iOS/Android mobile app. It works fine except that I can't tap it and have it bring up a number pad for me to type in a value. Is this feature available?


  • Moderators

    @kgregory
    Please be more specific...
    QML?
    QtWidgets?
    Code snippet?



  • I'm using QML with a Qt Quick2 application. Here is a snippet:

    SpinBox {
        id: sizeSet1
        height: 0.05*begin.height
        width: 0.22*begin.width
        anchors.top: sizeLbl1.bottom
        anchors.topMargin: 0.001*begin.height
        anchors.right: parent.right
        anchors.rightMargin: 0.01*begin.width
        from: (modelData.device === 3) ? 3 : 1
        to: (modelData.device === 3) ? 100 : 300
        font.pixelSize: 0.04*begin.height
        Component.onCompleted: {
            sizeSet1.value = modelData.size
            modelData.size = Qt.binding(function() { return sizeSet1.value})
        }
    }
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.