Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Hide text area from SpinBox



  • Hi, I want to hide the text area from the spin box and show only the indicators. I am using SpinBox from QtQUick Controls 1. Example code:

    import QtQuick 2.12
    import QtQuick.Window 2.12
    import QtQuick.Controls 1.4
    
    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        SpinBox {
            id: spinBox
            minimumValue:  37
            maximumValue: 40
            value: 38
            stepSize: 1
        }
    }
    

    3b18f844-5805-4a50-aa84-43b580270200-image.png

    Is this possible?



  • Could you explain why you need the Spinbox but without numbers?, it might help us find you a solution.



  • @sonulohani89 have you seen the "Customizing SpinBox" section in the documentation? I guess you could customise the contentItem to achieve what you want. (Though I do agree with Markkyboy that it would be useful to know what you are actually trying to achieve as this might not be the best approach.)



  • @Bob64 Yeah, that documentation is helpful. Thanks. I was able to hide the text box now by using contentItem. Thanks


Log in to reply