Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Hide text area from SpinBox
Forum Updated to NodeBB v4.3 + New Features

Hide text area from SpinBox

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 3 Posters 457 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sonulohani89
    wrote on 1 Oct 2021, 08:04 last edited by sonulohani89 10 Jan 2021, 08:05
    #1

    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?

    B 1 Reply Last reply 1 Oct 2021, 10:02
    0
    • M Offline
      M Offline
      Markkyboy
      wrote on 1 Oct 2021, 08:36 last edited by
      #2

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

      Don't just sit there standing around, pick up a shovel and sweep up!

      I live by the sea, not in it.

      1 Reply Last reply
      0
      • S sonulohani89
        1 Oct 2021, 08:04

        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?

        B Offline
        B Offline
        Bob64
        wrote on 1 Oct 2021, 10:02 last edited by Bob64 10 Jan 2021, 10:03
        #3

        @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.)

        S 1 Reply Last reply 1 Oct 2021, 10:45
        1
        • B Bob64
          1 Oct 2021, 10:02

          @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.)

          S Offline
          S Offline
          sonulohani89
          wrote on 1 Oct 2021, 10:45 last edited by sonulohani89 10 Jan 2021, 10:45
          #4

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

          1 Reply Last reply
          0

          1/4

          1 Oct 2021, 08:04

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved