diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-04-01 15:49:56 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-04-01 15:50:10 +0200 |
commit | 920542ffbb1b97c8ac22abb372d0ae042066ebd2 (patch) | |
tree | 7a590f8bac4af2371c8fd1824e8fcc97cfbc428e /examples/nfc | |
parent | 07aecc2217e591a40e363e1a47c8a9a9d7b28365 (diff) | |
parent | 4ef99e568b6ecccf9cd867d649504c79f70e02fc (diff) |
Merge remote-tracking branch 'gerrit/dev' into neard
Change-Id: I3d03b2306a8e9e0e176f16475274134af973e631
Diffstat (limited to 'examples/nfc')
-rw-r--r-- | examples/nfc/ndefeditor/mimeimagerecordeditor.cpp | 1 | ||||
-rw-r--r-- | examples/nfc/poster/poster.qml | 20 |
2 files changed, 11 insertions, 10 deletions
diff --git a/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp b/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp index 134d674c..5ed733a4 100644 --- a/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp +++ b/examples/nfc/ndefeditor/mimeimagerecordeditor.cpp @@ -134,6 +134,7 @@ void MimeImageRecordEditor::on_mimeImageOpen_clicked() ui->mimeImageFile->setText(mimeDataFile); ui->mimeImageImage->setPixmap(QPixmap::fromImage(image)); + m_record.setTypeNameFormat(QNdefRecord::Mime); m_record.setType(mimeType.toLatin1()); m_record.setPayload(imageData); } diff --git a/examples/nfc/poster/poster.qml b/examples/nfc/poster/poster.qml index a9ad9a2b..89e6af19 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 |