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. Can any body tell me what value i need to set for button height when height is 0.25" ?
QtWS25 Last Chance

Can any body tell me what value i need to set for button height when height is 0.25" ?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
9 Posts 4 Posters 461 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.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on last edited by Qt embedded developer
    #1

    i need help what value i need to set when my given button or text edit box size is in inch.

    like Any button/field on the Display used for data entry or selection shall be a minimum size of 0.5” x 0.5.

    so what value i need to set for my rectangle's height and width ?

    jsulmJ 1 Reply Last reply
    0
    • Q Qt embedded developer

      i need help what value i need to set when my given button or text edit box size is in inch.

      like Any button/field on the Display used for data entry or selection shall be a minimum size of 0.5” x 0.5.

      so what value i need to set for my rectangle's height and width ?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Qt-embedded-developer You will need to first find out the resolution of the current screen (pixels per inch). Then you can calculate how many pixels you need to set for height. I don't know though how to get the screen resolution (not screen size!).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      Q 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Qt-embedded-developer You will need to first find out the resolution of the current screen (pixels per inch). Then you can calculate how many pixels you need to set for height. I don't know though how to get the screen resolution (not screen size!).

        Q Offline
        Q Offline
        Qt embedded developer
        wrote on last edited by Qt embedded developer
        #3

        @jsulm display resolution is 1360*700 . then any body help me further for find what value i need to set ?

        JonBJ jsulmJ 2 Replies Last reply
        0
        • Q Qt embedded developer

          @jsulm display resolution is 1360*700 . then any body help me further for find what value i need to set ?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @Qt-embedded-developer
          Then it depends on the size of the screen for that resolution! For that fixed screen resolution apparently you have 700 pixels to fill its height.

          But that's not going to scale well if you use a different monitor or resolution....

          1 Reply Last reply
          0
          • Q Qt embedded developer

            @jsulm display resolution is 1360*700 . then any body help me further for find what value i need to set ?

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Qt-embedded-developer said in Can any body tell me what value i need to set for button height when height is 0.25" ?:

            display resolution is 1360*700

            This is not resolution! Resolution means: pixels per inch.
            If you know the physical dimensions of your screen you can calculate the resolution by yourself.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            JoeCFDJ 1 Reply Last reply
            0
            • jsulmJ jsulm

              @Qt-embedded-developer said in Can any body tell me what value i need to set for button height when height is 0.25" ?:

              display resolution is 1360*700

              This is not resolution! Resolution means: pixels per inch.
              If you know the physical dimensions of your screen you can calculate the resolution by yourself.

              JoeCFDJ Offline
              JoeCFDJ Offline
              JoeCFD
              wrote on last edited by
              #6

              @jsulm that is called resolution as well.
              get physical size in millimeters
              https://doc.qt.io/qt-5/qscreen.html#physicalSize-prop

              JonBJ 1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @jsulm that is called resolution as well.
                get physical size in millimeters
                https://doc.qt.io/qt-5/qscreen.html#physicalSize-prop

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @JoeCFD
                This is good, but as the documentation warns:

                Depending on what information the underlying system provides the value might not be entirely accurate.

                This relies on the user having told the OS what size monitor they are using. I never do that! So the OP may or may not find this works for his case.

                JoeCFDJ 1 Reply Last reply
                0
                • JonBJ JonB

                  @JoeCFD
                  This is good, but as the documentation warns:

                  Depending on what information the underlying system provides the value might not be entirely accurate.

                  This relies on the user having told the OS what size monitor they are using. I never do that! So the OP may or may not find this works for his case.

                  JoeCFDJ Offline
                  JoeCFDJ Offline
                  JoeCFD
                  wrote on last edited by
                  #8

                  @JonB Maybe it is better to have a requirement like minimum relative height. It is tough to set minimum absolute height.

                  JonBJ 1 Reply Last reply
                  0
                  • JoeCFDJ JoeCFD

                    @JonB Maybe it is better to have a requirement like minimum relative height. It is tough to set minimum absolute height.

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #9

                    @JoeCFD The OP wants 0.25", what can I say? ;-)

                    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