In case OpenGL is used, this might be a bug in your OpenGL driver.

As far as I know; Qt uses `GL_NEAREST` when `smooth` is unset, and `GL_LINEAR` when `smooth` is set.

I doubt there is extra logic to check if the texture size is the same as `Image` size that it uses `GL_NEAREST` regardless of `smooth` property.

I think the docs should say something like "this is the expected behavior of the driver", about the `smooth` property.

You might consider using something like: `smooth: (paintedWidth !== width) || (paintedHeight !== height) `.

I think it would be better if Qt did not use `GL_LINEAR` in these cases by default:

- Texture size is the same as `Image` size.

- `Image` size is non-fractional upscaling of the texture size. (Integer upscale)

That being said, I don't know how Qt RHI behaves. This is valid for direct OpenGL.

On 23/07/2022 03:40, Alexander Dyagilev wrote:

I'm generating image (QR code) using QML image provider. Show it using Image control using actual size (i.e. width height are not specified, and I also set fill mode to Pad).

Windows and macOS - works fine.

Linux (Ubuntu) - it's shown blurred. If I set smooth property to false - it's shown as expected.

Is it a bug? In docs it's stated that smooth has no effect if image is not scaled.

Qt 5.12.12.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Interest mailing list

Reply via email to