I have PNG image of 256x256 size.

I'm trying to show it on 25x25 size using this code:

Image{

width:25

height:25

fillMode:Image.PreserveAspectFit

horizontalAlignment:Image.AlignHCenter

verticalAlignment:Image.AlignVCenter

source:preview.url

}

I'm getting this:

If I add sourceSize so the code becomes this:

Image{

width:25

height:25

sourceSize.height:25

sourceSize.width:25

fillMode:Image.PreserveAspectFit

horizontalAlignment:Image.AlignHCenter

verticalAlignment:Image.AlignVCenter

source:preview.url

}

I'm getting this:

Looks better. Why is it so?

OS: Windows 10. Screen.devicePixelRatio is 1.0.

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to