| 1 |
import QtQuick 2.9 |
| 2 |
import io.thp.pyotherside 1.5 |
| 3 |
|
| 4 |
Item { |
| 5 |
id: obj |
| 6 |
|
| 7 |
signal callSignal() |
| 8 |
|
| 9 |
function callFunction() { |
| 10 |
print('Function Called') |
| 11 |
return 'hoho' |
| 12 |
} |
| 13 |
|
| 14 |
function signalConnection(){ |
| 15 |
print('Signal Called') |
| 16 |
} |
| 17 |
|
| 18 |
Component.onCompleted: { |
| 19 |
obj.callSignal.connect(signalConnection) |
| 20 |
} |
| 21 |
|
| 22 |
Python { |
| 23 |
Component.onCompleted: { |
| 24 |
addImportPath(Qt.resolvedUrl('.')); |
| 25 |
|
| 26 |
importModule('TestModule', function(){ |
| 27 |
call('TestModule.makeCalls', [obj]) |
| 28 |
}) |
| 29 |
} |
| 30 |
} |
| 31 |
} |