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)
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)
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
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