[Solved] Qt Quick QML Image Quality
-
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.
-
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.
-
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@