Closed dbsxdbsx closed 4 years ago
Your problem is this: QHostAddress("test.mosquitto.org")
. QHostAddress cannot convert a host name to an IP address. You should pass an IP-address to this constructor. If you want to use a hostname, you should use one of the QMQTT::Client
constructors that have QString hostName
as argument.
Thanks.
I've compiled it under vs2017_64 with qt 5.13.2. But in demo example, I just found it can never establish a connection.
part of my code:
I just don't know why it cannot establish connection--- Here
doConnected
is never touched