QT-5 minute quick set up MQTT client

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/switch_love_case/article/details/90273717

title: QT-5 minute quick build client MQTT
Tags: QT
DATE: 2019-5-16 22:32:00


QT-5 minute quick set up MQTT client

Reference links: https://blog.csdn.net/sxpsxp12/article/details/79353743
Reference Links: https://www.jianshu.com/p/7dc81771d246

This afternoon the newly installed QT can not wait to roll up a wave!

QT MQTT step of engineering structures as follows:
first compile the library MQTT
secondly MQTT QT library into your own project
and then call related functions for server connection and communication
followed by (part of the Source of my half an hour from the results of more than two links)

1, download the QT MQTT EMQ engineering from the official website, and opened with QT

2, QTCreater open qmqtt-master / qmqtt.pro in the project file and add CONFIG + = NO_UNIT_TESTS

3, add qmqtt-master \ src \ mqtt inside the header file to the root directory of the disk of the building just generated generated include folder

4, the new QT project will compile the above good copy in the project include the lib file to the project directory
where the file lib requires only four to


5, the next step is to add MQTT with QT library and select an external library and then select the file in the lib can



6, start programming it!


7, connect to the server successfully!

Guess you like

Origin blog.csdn.net/switch_love_case/article/details/90273717