blob: 3166ab647d3c3b35a21bcd3e194b904a89d5f11a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import QtQml 2.0
import Test.Singletons 1.0
QtObject {
property Component singletonAccessor : Component {
QtObject {
property var singletonHolder;
property int result: singletonHolder.testVar
}
}
property int firstLookup: singletonAccessor.createObject(this, { singletonHolder: CppSingleton1 }).result;
property int secondLookup: singletonAccessor.createObject(this, { singletonHolder: CppSingleton2 }).result;
}
|