aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml
diff options
context:
space:
mode:
authorNobuaki Sukegawa <nsukeg@gmail.com>2015-12-28 21:22:29 +0900
committerNobuaki Sukegawa <nsukeg@gmail.com>2016-03-05 08:26:29 +0000
commit3b7e2a69f7eb8597c807de39b4de39721e9e2bd2 (patch)
tree49b56fe716c888ba1498822032917353986cd944 /tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml
parentc7ac28fa354b96de37dc6cde5e3728da8daaacbb (diff)
Convert QByteArray in C++ type to ArrayBuffer in QML and vice-versa
Change-Id: Ie4e29a443a17826a3ce4d1e1912bd35dc497ac78 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml')
-rw-r--r--tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml b/tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml
new file mode 100644
index 0000000000..e8a51273ca
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.7
+import Test 1.0
+
+MyArrayBufferTestClass {
+ property bool ok: false
+ onByteArraySignal: ok = byteArrayProperty instanceof ArrayBuffer
+ Component.onCompleted: {
+ byteArrayProperty = new ArrayBuffer(42);
+ ok = byteArrayProperty instanceof ArrayBuffer && byteArrayProperty.byteLength == 42;
+ }
+}