changeset 30 | 5dc02b23752f |
child 33 | 3e2da88830cd |
29:b72c6db6890b | 30:5dc02b23752f |
---|---|
1 import Qt 4.7 |
|
2 |
|
3 QtObject { |
|
4 property bool test1: false; |
|
5 property bool test2: false; |
|
6 property bool test3: false; |
|
7 |
|
8 Component.onCompleted: { |
|
9 var a = 10; |
|
10 |
|
11 var func1 = new Function("a", "return a + 7"); |
|
12 var func2 = new Function("a", "return Qt.atob(a)"); |
|
13 var func3 = new Function("return a"); |
|
14 |
|
15 test1 = (func1(4) == 11); |
|
16 test2 = (func2("Hello World!") == Qt.atob("Hello World!")); |
|
17 test3 = (func3() == undefined); |
|
18 } |
|
19 } |