Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Why does the text change its size?
Forum Updated to NodeBB v4.3 + New Features

Why does the text change its size?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 614 Views 1 Watching
  • 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
    Stefano84
    wrote on last edited by
    #1

    Hello everyone,
    I would like to ask for help for an unusual fact. On some PCs the text is displayed too large. Anyone know the reason for this?

    For example, in this image the text is displayed correctly.
    3124ed79-b620-4834-9f6b-ac323c4d9bca-image.png

    In this image, however, the text is too large and is not displayed in full because it leaves the edges of the QLabel
    f661a937-1aab-49d0-8612-e64413ebd804-image.png

    Why is this happening?
    I use Qt Creator 4.11 on 64 bit Windows.
    Thank you all.

    jsulmJ 1 Reply Last reply
    0
    • S Stefano84

      Hello everyone,
      I would like to ask for help for an unusual fact. On some PCs the text is displayed too large. Anyone know the reason for this?

      For example, in this image the text is displayed correctly.
      3124ed79-b620-4834-9f6b-ac323c4d9bca-image.png

      In this image, however, the text is too large and is not displayed in full because it leaves the edges of the QLabel
      f661a937-1aab-49d0-8612-e64413ebd804-image.png

      Why is this happening?
      I use Qt Creator 4.11 on 64 bit Windows.
      Thank you all.

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

      @Stefano84 Do you use layouts?

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

      S 1 Reply Last reply
      2
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        Hi
        Also be aware of DPI scaling which can also result in such situations.
        https://doc.qt.io/qt-5.12/highdpi.html

        1 Reply Last reply
        2
        • S Offline
          S Offline
          Stefano84
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • jsulmJ jsulm

            @Stefano84 Do you use layouts?

            S Offline
            S Offline
            Stefano84
            wrote on last edited by
            #5

            @jsulm

            Hi jsulm,

            thanks for your time.
            No, I haven't used layouts. How you do it? The text is inside a QLabel. Can you give me an example of code?

            Thanks so much.

            jsulmJ 1 Reply Last reply
            0
            • S Stefano84

              @jsulm

              Hi jsulm,

              thanks for your time.
              No, I haven't used layouts. How you do it? The text is inside a QLabel. Can you give me an example of code?

              Thanks so much.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Stefano84 Please take a look at documentation: https://doc.qt.io/qt-5/layout.html
              There are also examples.

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

              S 1 Reply Last reply
              2
              • jsulmJ jsulm

                @Stefano84 Please take a look at documentation: https://doc.qt.io/qt-5/layout.html
                There are also examples.

                S Offline
                S Offline
                Stefano84
                wrote on last edited by Stefano84
                #7

                @jsulm

                Thanks,
                I did as you said but it doesn't work. I solved it by creating a configuration file "qt.conf" where I inserted the following lines:

                [Platforms]
                WindowsArguments = dpiawareness=0

                How do I mark that I solved it?

                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