//main.qml
import QtQuick 2.12
import QtQuick.Window 2.12
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Image {
id: m_iPdf
sourceSize.height: 300
fillMode: Image.PreserveAspectFit //保持宽高比
source: "pdf.svg"
}
}