具体教程可以参考这个:
https://www.cnblogs.com/charleechan/p/13931498.html
https://blog.csdn.net/luoyayun361/article/details/104671603
我只说一点,非常关键!!!
1、在下载qtmqtt时候,要选与你qt版本相同的包,不然编译总出错!
原因可看这篇文章:
https://forum.qt.io/topic/120579/no-member-named-erroroccurred-in-qabstractsocket/3
2、或者参考这篇文章修改代码:https://blog.csdn.net/liyuanbhu/article/details/106597506