import QtQuick 2.14 import QtQuick.Window 2.14 Window { visible: true width: 600 height: 800 title: qsTr("Hello World") Grid { columns: 3 spacing: 2 anchors.centerIn: parent Text { text: "A: without any" } Image { source: "rect.svg" } Image { source: "zero.png" } Text { text: "B: sourceSize bound to unset" } Image { source: "rect.svg" sourceSize: Qt.size(width,height) } Image { source: "zero.png" sourceSize: Qt.size(width,height) } Text { text: "(size comparison rects)" } Rectangle { color: "green" width: 128 / Screen.devicePixelRatio height: 128 / Screen.devicePixelRatio } Rectangle { color: "green" width: 128 height: 128 } Text { text: "C: size and sourceSize set" } Image { source: "rect.svg" width: 128 height: 128 sourceSize: Qt.size(width,height) } Image { source: "zero.png" width: 128 height: 128 sourceSize: Qt.size(width,height) } Text { text: "D: oversize, no sourceSize" } Image { source: "rect.svg" width: 200 height: 200 } Image { source: "zero.png" width: 200 height: 200 } } }