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

Image property "smooth: false" not working properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0
    • 5.2.0 Beta1 , 5.2.0 RC1, 5.2.0, 5.2.1
    • None
    • Reproduced on two different Linux systems (Fedora and Ubuntu under Qt 5.2 beta and Qt 5.2 rc1 and Qt 5.2 final release)
    • c6c95915f076577d5194044d793889cb8b690230

    Description

      There is a rendering bug since Qt 5.2 beta where scaled images with 'smooth' turned off are actually rendered with smoothing turned on (looking blurry). Whether the property applies properly depends on the state of other items in the scene.

      Long story:

      We write a small 2D MMORPG client. In this client we scale up the entire UI if the resolution is larger than a specific value. However since we have pixel art graphics we use smooth: false for all Image {} elements to keep the pixel look.

      This worked great in Qt 5.1.1 and below. However since Qt 5.2 beta in certain situations turning off the smooth rendering does not seem to work.

      You can reproduce it reliably using our client:

      Now if you are in the game and you have the window larger than 959x959 to make the UI scale up.

      Now you should realize that the joystick in lower left and the buttons in lower right are blurred even though their images have "smooth: false" set.

      Other strange issues happening since Qt 5.2 beta that may be related: Once you "open" the inventory or status page by clicking the tabs at the sides of the screen (or press 'c' or 'i') the blurring suddenly goes away.

      The pages we open are basically only items which are over the main game. However opening the windows has an effect on the scrolling of the map. This is related to hiding the contents of these pages when they are entirely offscreen.

      I attached two screenshots which show the bug. I did not do anything but opening the side window.

      Attachments

        1. blurred_graphics.png
          blurred_graphics.png
          88 kB
        2. lines.png
          lines.png
          3 kB
        3. plane9-cfg-bad.JPG
          plane9-cfg-bad.JPG
          184 kB
        4. plane9-cfg-good.JPG
          plane9-cfg-good.JPG
          164 kB
        5. test.qml
          0.3 kB
        6. unblurred_graphics.png
          unblurred_graphics.png
          101 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            ablu Erik Schilling
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes