0
votes

For my frameless qml app i made close, minimise and maximize icons in ms paint (28×28 pixel art) and then added transparent background with photoshop.

I put them as icons on qml buttons. But they are looking blurry.

I tried disabling antialiasing, mipmaps, smoothing but still blurry.

Any help ? I want them to look pixely like minecraft text.

Edit : I appears that qml uses linear scaling for images. But for pixely look i need "nearest neighbour" scaling.

How can i use nearest neighbour in qml ?

1
Maybe related to QML Icons bad quality? - musicamante
that question doesnt have answer either. - Tanishq Banyal
The OP of that question solved it according to comments, so, that question has an answer. If that doesn't suit you, that's another story. - musicamante
can you show some code ? - Nemo

1 Answers

0
votes

NVM Solved It !

It turns out that for nearest neighbour upscaling, you need to set smooth: false (and for downscaling you need mipmaps as well) + remove sourceWidth & sourceHeight from your qml code. (Sometimes qt-creator turns it on by itself and this option is basically compresssing image resolution)

But in my case the Problem was that MS Paint in Windows 10 doesn't use solid colours. It uses solid colours in middle and increases transparency towards edges of strokes.

And that creates the blurry effect when viewed on small icon.

Simple Solution : Install Windows 7 and use its MS Paint. Or just use some other program.