Qt5.12.2 add mqtt module
Download the mqtt Qt submodule
https://download.qt.io/official_releases/qt/5.15/5.15.4/submodules/
Unzip after downloading:
Use Qt to compile modules and install to generate dynamic libraries
qtcreator opens the pro project file under the decompressed qtmqtt source code
Choose the qt5.12.2 mingw compiler, and choose 32-bit or 64-bit according to your usage:
In the project configuration, add the install parameter to make:
Then build and compile
After successful success, the mqtt library and header files will be automatically generated in the Qt installation directory
At this time, after creating a new project, add QT += mqtt in .pro and it can be used normally