aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data/scarceresources/scarceResourceTest.qml
blob: 3775172c044936ea493a51d2f27c0536157b392c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import QtQuick 1.0
import Qt.test 1.0

// Here we import a scarce resource directly, and use it in a binding.
// 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 int scarceResourceTest: scarceResourceProvider.scarceResource,100 // return 100, but include the scarceResource in the binding to be evaluated.
}