Thursday, July 18, 2013

qml: load Image from internet

Qt Quick example code to load Image from internet.

import QtQuick 2.0

Rectangle {
    width: 360
    height: 360
    Text {
        text: qsTr("Hello World: " + parent.width + " x " + parent.height)
        anchors.centerIn: parent
    }
    Image {
        id: myimage
        source: "http://goo.gl/J4xj0"
    }

    MouseArea {
        anchors.fill: parent
        onClicked: {
            Qt.quit();
        }
    }
}


load Image from internet
load Image from internet


Related:
- qml example: load image from internet and handle status changed