<div dir="ltr">Versions of PyQT tested: 5.8.2 and 5.9<br><br>Basically there is a signal on QWebChannelAbstractTransport called "messageReceived" and it's signature is as follow:<br><br>void messageReceived(const QJsonObject &message, QWebChannelAbstractTransport *transport)<br><br>According to PyQt documentation, QJsonObject is internally converted to "dict", but when I try to emit that signal passing a dict that was returned from QJsonDocument.object(), it fails:<br><br>message = QJsonDocument.fromJson(messageData.encode("utf-8"), parser_error)<br>self.messageReceived.emit(message.object(), self)<br><br>Traceback (most recent call last):<br>  File "main.py", line 54, in textMessageReceived<br>    self.messageReceived.emit(a, self)<br>TypeError: messageReceived(self, Dict[str, Union[QJsonValue, QJsonValue.Type, Iterable[QJsonValue], bool, int, float, str]], QWebChannelAbstractTransport).emit(): argument 1 has unexpected type 'dict'<br>Aborted<div><br></div><div>I tried passing an empty dict {} and it worked (although it failed later cause of other reasons, but the signal was emitted).<br><br>A better context is provided here: <a href="https://pastebin.com/knJr26Rj">https://pastebin.com/knJr26Rj</a><br><br>--<br>Davi R. Tavares</div></div>