summaryrefslogtreecommitdiffstats
path: root/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/qt5-everywhere/demos/gridrssnews/main.qml')
-rw-r--r--basicsuite/qt5-everywhere/demos/gridrssnews/main.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml
index 3041242..2856cfb 100644
--- a/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml
+++ b/basicsuite/qt5-everywhere/demos/gridrssnews/main.qml
@@ -74,6 +74,8 @@ Rectangle {
onStatusChanged: {
if (status == XmlListModel.Ready) {
playbanner.start();
+ } else if (status == XmlListModel.Error) {
+ networkErrorMessage.start();
}
}
}
@@ -139,6 +141,21 @@ Rectangle {
pageSize: grid.visibleArea.widthRatio
}
+ Item {
+ id: networkErrorBox
+ opacity: 0
+ anchors.fill: parent
+
+ Text {
+ anchors.centerIn: parent
+ text: qsTr("Sorry! No network connection")
+ font.family: uiFont;
+ font.pixelSize: appHeaderFontSize;
+ color: textColor
+ smooth: true
+ }
+ }
+
SequentialAnimation {
id: playbanner
running: false
@@ -146,5 +163,14 @@ Rectangle {
NumberAnimation { target: grid; property: "opacity"; to: 1.0; duration: 300}
}
+ NumberAnimation {
+ id: networkErrorMessage
+ running: false
+ target: networkErrorBox
+ property: "opacity"
+ to: 1.0
+ duration: 300
+ }
+
}