1 Star 0 Fork 1

谷动谷力/MQTT-Client-Examples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
assets
mqtt-client-Android-Kotlin
mqtt-client-Android
mqtt-client-Angular.js
mqtt-client-C-RT-Thread
mqtt-client-C-nng
mqtt-client-C-paho
mqtt-client-Csharp-MqttNet
mqtt-client-Csharp
mqtt-client-Django
mqtt-client-ESP32
mqtt-client-ESP8266
mqtt-client-Electron
mqtt-client-Elixir
mqtt-client-Erlang
mqtt-client-Flask
mqtt-client-Flutter
mqtt-client-Go
mqtt-client-Java
mqtt-client-JavaScript
mqtt-client-Micropython
mqtt-client-Node.js
mqtt-client-PHP
mqtt-client-Python3
mqtt-client-Qt
README.md
client.pro
example.cpp
mqtt-client-React-Native
mqtt-client-React
mqtt-client-SpringBoot
mqtt-client-Vue.js
mqtt-client-Vue3.js
mqtt-client-WebSocket
mqtt-client-swift
mqtt-client-wechat-miniprogram
paho.mqtt.android-kotlin
.gitignore
LICENSE
README.md
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

QT MQTT client examples

Qt install

  • All platform Qt5.7 can find here. if your platform is ubuntu20.04, you can download qt downloader by run:

    wget https://download.qt.io/new_archive/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
    
  • then, we change the execution authority of qt-opensource-linux-x64-5.7.0.run and execute.

    sudo chmod u+x qt-opensource-linux-x64-5.7.0.run
    ./qt-opensource-linux-x64-5.7.0.run
    
  • find your qmake installed path, set qmake run path.

    PATH=$PATH:$PWD
    export PATH
    

Get qmqtt

git clone https://github.com/emqx/qmqtt.git

Compile qmqtt

cd qmqtt
qmake
make
sudo make install

Get sample code

git clone https://github.com/emqx/MQTT-Client-Examples.git

Compile sample

cd MQTT-Client-Examples/mqtt-client-Qt/
mkdir build
cd build
qmake ..
make
./client/qmqtt_example

when you run qmqtt_example, make sure a local broker can access.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lojam/MQTT-Client-Examples.git
git@gitee.com:lojam/MQTT-Client-Examples.git
lojam
MQTT-Client-Examples
MQTT-Client-Examples
master

搜索帮助