import QtQuick 2.0 import QtQuick.Window 2.0 Window { title: "Qteveloper(qteveloper.blogspot.com)"; width: 360 height: 360 Text { id: myHello anchors.horizontalCenter: parent.horizontalCenter text: "Hello World" } Image { id: myImage source: "http://goo.gl/kdbgF8" anchors { left: parent.left top: myHello.bottom } onStatusChanged: switch(myImage.status){ case Image.Null: myState.text = "no image has been set"; break; case Image.Ready: myState.text = "the image has been loaded\n" + myImage.width + " x " + myImage.height; break; case Image.Loading: myState.text = "the image is currently being loaded"; break; case Image.Error: myState.text = "an error occurred while loading the image"; break; } } Text { id: myState anchors.horizontalCenter: parent.horizontalCenter anchors { left: myImage.left top: myImage.bottom leftMargin: 20 topMargin: 10 } } }
Sunday, August 25, 2013
qml example: load image from internet and handle status changed
Labels
Dev. tools
(13)
how to
(10)
Internet of Things (IoT)
(1)
learn Qt
(1)
misc
(1)
misc.
(1)
mobile
(2)
news
(6)
OpenCV
(1)
OpenGL
(1)
QML
(1)
qml example
(40)
Qt
(2)
Qt Cloud
(1)
Qt Creator
(3)
Qt Creator Examples
(4)
Qt Enterprise Embedded
(1)
Qt Examples
(1)
Qt for Android
(5)
Qt for iOS
(2)
Qt for MCU
(1)
Qt news
(1)
Qt Quick
(3)
Qt Quick Control
(1)
Qt Quick Designer
(2)
QtQuick example
(14)
QtQuick.Controls examples
(13)
Ubuntu SDK
(1)
VirtualBox
(1)
WebEngine
(1)