From 3b7e2a69f7eb8597c807de39b4de39721e9e2bd2 Mon Sep 17 00:00:00 2001 From: Nobuaki Sukegawa Date: Mon, 28 Dec 2015 21:22:29 +0900 Subject: Convert QByteArray in C++ type to ArrayBuffer in QML and vice-versa Change-Id: Ie4e29a443a17826a3ce4d1e1912bd35dc497ac78 Reviewed-by: Simon Hausmann --- tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml (limited to 'tests/auto/qml/qqmllanguage/data/arraybuffer_property_set.qml') 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; + } +} -- cgit v1.2.3