Need antialiasing for Qml Image fillMode
antialiasing, image, qml, qt
Solution
As a pure QML solution you can simply set the `smooth` property of the `Image` element to `true`:
import QtQuick 1.0
Image {
smooth: true // smoother image
anchors.rightMargin: 10
anchors.leftMargin: 10
anchors.bottomMargin: 10
anchors.topMargin: 10
anchors.fill: parent
source: "Google Chrome Icon.png"
fillMode: Image.PreserveAspectFit
}
Problem
I have a piece of code in QML: ``` Image { anchors.rightMargin: 10 anchors.leftMargin: 10 anchors.bottomMargin: 10 anchors.topMargin: 10 anchors.fill: parent source: "Google Chrome Icon.png" fillMode: Image.PreserveAspectFit } ``` The image is automatically stretch with the window. But the stretching method is not antialiased, thus the ugly result: Is there any method to make the result great?