Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97731

Display picture on QLabel: Scaling problems on Windows Platforms

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.15.2, 6.2.0
    • windwos11
    • Windows

    Description

      In main.cpp, I use QLabel to display pictures. When Qt5 is used to build, the picture displays normally, but when qt6.2 is used to build, the picture becomes larger and blurred. The reason is that my windows system sets a 125% zoom ratio, so qt6.2 enlarges each pixel by 1.25 times, so the whole picture is also enlarged by 1.25 times. But even if I shrink the picture, it won't become clear, because what gets bigger is each pixel. When I set the zoom ratio of windows to 100%, the picture will display normally. On Qt5, no matter what scale, it can be displayed normally.

       

      The first two pictures I set 125% zoom. When I change it to 100%, it will look like the last two pictures.

       

      You can use the uploaded main.cpp compiled by qt6.2 to open a high-definition picture and set different windows scaling to see the effect. They will be different.

      Then you can use Qt5 to do the same thing, and the effect won`t be different.

      Attachments

        1. image-2021-10-24-22-01-53-920.png
          14 kB
          程 全中
        2. image-2021-10-24-22-03-19-194.png
          295 kB
          程 全中
        3. image-2021-10-24-22-03-50-674.png
          13 kB
          程 全中
        4. image-2021-10-24-22-04-14-305.png
          275 kB
          程 全中
        5. main.cpp
          0.6 kB
          程 全中
        6. Screenshot 2021-10-26 at 06.58.55.png
          34 kB
          Volker Hilsheimer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vhilshei Volker Hilsheimer
            cqz 程 全中
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes