1  import QtQuick 2.12
2  import QtQuick.Window 2.12

3  Window {
4      id: win
5      width: 640
6      height: 480
7      visible: true
8      title: qsTr("Image Show")
9      Item {
10       id: root
11       width: 640
12       height: 380

13       Image {
14         id: qtlogo
15          source: "qtlogo.jpg"

16          onProgressChanged: {
17            if(progress < 1)
18                typing.text = "image is Loding"

19          }
20          onStatusChanged: {
21              if(status == Image.Ready)
22                  typing.text = "Your image is loaded"
23          }

24          sourceSize.width: root.width / 2
25          sourceSize.height: root.height / 2
26          anchors {
27              horizontalCenter: root.horizontalCenter
28          }
29          Text {
30             id: typing
31             text: ""
32             font.family: "Times"
33             font.pixelSize: 40
34             anchors {
35                top: qtlogo.bottom
36                topMargin: 10
37                horizontalCenter: qtlogo.horizontalCenter
38             }//end of anchors
39        }//end of text
40      }//end of image
41    }//end of item
42 } //end of window
