Advertisement
NikkSaan

QML Pyotherside

Jan 26th, 2019
3,007
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.58 KB | None | 0 0
  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.     }
  12.  
  13.     function signalConnection(){
  14.         print('Signal Called')
  15.     }
  16.  
  17.     Component.onCompleted: {
  18.         obj.callSignal.connect(signalConnection)
  19.     }
  20.  
  21.     Python {
  22.  
  23.         Component.onCompleted: {
  24.             addImportPath(Qt.resolvedUrl('.'));
  25.            
  26.             importModule('TestModule', function(){
  27.                 call('TestModule.makeCalls', [obj])
  28.             })
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement