| 1 |
import QtQuick 2.0 |
| 2 |
// Note that we import 1.3 here instead of >= 1.4 |
| 3 |
import io.thp.pyotherside 1.3 |
| 4 |
|
| 5 |
Python { |
| 6 |
Component.onCompleted: { |
| 7 |
var foo = undefined; |
| 8 |
|
| 9 |
// qml: Received error: Import PyOtherSide 1.4 or newer to use getattr() |
| 10 |
getattr(foo, 'test'); |
| 11 |
|
| 12 |
var func = eval('[]'); |
| 13 |
|
| 14 |
// qml: Received error: Function not found: '' (unexpected EOF while parsing (<string>, line 0)) |
| 15 |
call(func, [], function (result) {}); |
| 16 |
|
| 17 |
// qml: Received error: Function not found: '' (unexpected EOF while parsing (<string>, line 0)) |
| 18 |
var result = call_sync(func, []); |
| 19 |
|
| 20 |
Qt.quit(); |
| 21 |
} |
| 22 |
|
| 23 |
onError: { |
| 24 |
console.log('Received error: ' + traceback); |
| 25 |
} |
| 26 |
} |