예제 #1
0
 def send_qml_signal(self, name, arguments=()):
     if name in self._qml_callbacks:
         for cb in self._qml_callbacks[name]:
             try:
                 cb.call([convert_object_to_qjsvalue(arg, self.dice.qml_engine) for arg in arguments])
             except BaseException as e:
                 qDebug("Could not send signal "+str(name)+"::"+str(arguments))
                 self.dice.process_exception(e)
예제 #2
0
 def send_qml_signal(self, name, arguments=()):
     if name in self._qml_callbacks:
         for cb in self._qml_callbacks[name]:
             try:
                 cb.call([
                     convert_object_to_qjsvalue(arg, self.dice.qml_engine)
                     for arg in arguments
                 ])
             except BaseException as e:
                 qDebug("Could not send signal " + str(name) + "::" +
                        str(arguments))
                 self.dice.process_exception(e)
예제 #3
0
 def process_finished_call(self, result, callback):
     assert QThread.currentThread() == self.dice.thread(
     )  # we must be in the main thread
     result = convert_object_to_qjsvalue(result, self.dice.qml_engine)
     callback.call([result])  # QJSValue.call expects a list here
예제 #4
0
파일: app.py 프로젝트: nxsofsys/dice-dev
 def process_finished_call(self, result, callback):
     assert QThread.currentThread() == self.dice.thread()  # we must be in the main thread
     result = convert_object_to_qjsvalue(result, self.dice.qml_engine)
     callback.call([result])  # QJSValue.call expects a list here