aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data/arraybuffer_signal_arg.qml
blob: d9f436e7887885ccb78f46d7c7101ba5ca275df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import QtQuick 2.7
import Test 1.0

MyArrayBufferTestClass {
    property bool ok: false
    onByteArraySignal: {
        var view = new DataView(arg);
        ok = arg instanceof ArrayBuffer
            && arg.byteLength == 2
            && view.getUint8(0) == 42
            && view.getUint8(1) == 43;
    }
    Component.onCompleted: emitByteArraySignal(42, 2)
}