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. [Solved] Qt Quick QML Image Quality
Forum Update on Monday, May 27th 2025

[Solved] Qt Quick QML Image Quality

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 2.2k 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.
  • M Offline
    M Offline
    matinzk
    wrote on last edited by
    #1

    Hi,

    We're programming an app with QML using Qt quick. The application then runs on a Raspberry Pi.

    The images that we're using don't come out as expected, especially the ones that have shadows. The shadows have very bad quality gradient.

    We have tried JPG, PNG and BMP images. The quality of these have been tested with 72 pixels per inch up to 300 pixels per inch. Also smooth and antialiasing properties have been set to true also, but still the quality is bad.

    Anything else we need to know to sort this out?

    Thanks.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      john_god
      wrote on last edited by
      #2

      Are you resizing the images ? If yes can you try a image without resizing and check if the quality gets better ?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        matinzk
        wrote on last edited by
        #3

        No image gets resized. Everything in original size.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          matinzk
          wrote on last edited by
          #4

          After a it of research I found the mipmap property. I tried it but only QtQuick 2.3 supports it and we're currently using QtQuick 2.0.

          If I change the import from QtQuick 2.0 to QtQuick 2.3 and run on Raspberry Pi we get a white screen. Is this normal?!

          Thank you.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            matinzk
            wrote on last edited by
            #5

            I've found a solution and it works very well. Seems like it's a depth issue.

            Add this before your view show object.

            @ // CORRECTION DEPTH
            QSurfaceFormat surfaceFormat;
            surfaceFormat.setAlphaBufferSize(8);
            v.setClearBeforeRendering(true);
            v.setColor(QColor(Qt::transparent));
            v.setFlags(Qt::FramelessWindowHint);
            v.setFormat(surfaceFormat);
            // CORRECTION DEPTH END@

            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