summaryrefslogtreecommitdiff
path: root/tests/auto/qml/qqmlecmascript/data/scarceResourceCopyFromJs.var.qml
blob: 09868e5e7c286a0025ba64af5b79489ef4443ba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import QtQuick 2.0
import Qt.test 1.0
import "scarceResourceTest.var.js" as ScarceResourceProviderJs

// Here we import a scarce resource directly, from JS module.
// It is not preserved or released manually, so it should be
// automatically released once evaluation of the binding
// is complete.

QtObject {
    property MyScarceResourceObject a;
    a: MyScarceResourceObject { id: scarceResourceProvider }
    property var scarceResourceCopy: ScarceResourceProviderJs.importScarceResource(scarceResourceProvider)
}