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. How to change size (font) of numbers in a SpinBox (QtQuick.Controls 1.X)
Qt 6.11 is out! See what's new in the release blog

How to change size (font) of numbers in a SpinBox (QtQuick.Controls 1.X)

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 3.0k 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.
  • F Offline
    F Offline
    Fheanor
    wrote on last edited by Fheanor
    #1

    Hello,

    I use a SpinBox from QtQuick.Controls 1.X and I need to change the height of the SpinBox
    However, it doesn't change the size of the numbers in the SpinBox and I would like to adjust these numbers to the size of the SpinBox

    Example :

    SpinBox {
        height: 200
       font : 50 //not working
         style: SpinBoxStyle{
                  font: 50 //Not working either
         }
    }
    

    How could I proceed ?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Madhu M S
      wrote on last edited by
      #2

      Hi,

      If you want to change the size of the numbers in the SpinBox , you need do like this:

      SpinBox {
      height: 200
      font.pixelSize:height
      }

      1 Reply Last reply
      3
      • F Offline
        F Offline
        Fheanor
        wrote on last edited by
        #3

        Hello, it works great, thanks !

        1 Reply Last reply
        0

        • Login

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