安装qt module 以qtmqtt为例
According to this, there's no need to add libraries, since MQTT is a Qt module just add this line in your pro file:
QT += mqtt
To use a Qt module, it must be installed in the Qt lib directory.
First, retrieve the lib directory path executing this command from a terminal:
qmake -query QT_INSTALL_LIBS
Cd into that directory and check if a file called Qt5Mqtt.dll is there: if not, you must build/install the module.
To get the module source code, you can execute this git command:
git clone git://code.qt.io/qt/qtmqtt.git
Once you have the source files, cd into the source files directory containing the file qtmqtt.pro and run these commands:
qmake make make install
(you may need administrator privileges for the last one).
After the commands completed successfully, you should be able to see the library in the QT_INSTALL_LIBS directory, and use the module in a Qt project.
In case of compilation issues, open the qtmqtt.pro file with creator, and try to build the library from there, then manually install (copy) it into the QT_INSTALL_LIBS.