summaryrefslogtreecommitdiffstats
path: root/examples/nfc
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2015-03-23 14:13:32 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-03-24 11:03:51 +0000
commit0ae7051fbee32bc7bd2cbe452c78400ac7bb18d1 (patch)
tree52532e364d82d2e700d9437b88cfe26ef9a04e5d /examples/nfc
parent1347daf482148127a75b72048db6b76ecc058242 (diff)
Fix loading of image and show image beneath texts
Change-Id: I3c623dc0db720083bc2c0c4ef53e70ccf208bfd8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'examples/nfc')
-rw-r--r--examples/nfc/poster/poster.qml20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/nfc/poster/poster.qml b/examples/nfc/poster/poster.qml
index 499839e7..e7b5bba3 100644
--- a/examples/nfc/poster/poster.qml
+++ b/examples/nfc/poster/poster.qml
@@ -91,7 +91,7 @@ Rectangle {
}
break;
case NdefRecord.Mime:
- if (messageRecords[i].type.startsWith("image/")) {
+ if (messageRecords[i].type.indexOf("image/") === 0 ) {
posterImage.source = messageRecords[i].uri;
found = true;
}
@@ -115,15 +115,6 @@ Rectangle {
font.pointSize: 18
}
- Text {
- id: posterText
- anchors.horizontalCenter: parent.right
- anchors.horizontalCenterOffset: - parent.width / 4
- y: -height
- font.bold: true
- font.pointSize: 18
- }
-
Image {
id: posterImage
scale: Image.PreserveAspectFit
@@ -135,6 +126,15 @@ Rectangle {
}
Text {
+ id: posterText
+ anchors.horizontalCenter: parent.right
+ anchors.horizontalCenterOffset: - parent.width / 4
+ y: -height
+ font.bold: true
+ font.pointSize: 18
+ }
+
+ Text {
id: posterUrl
anchors.horizontalCenter: parent.right
anchors.horizontalCenterOffset: - parent.width / 4