How to use mqtt client class in qml?
-
I am trying to use mqtt protocol in qt quick application. i have already followed the steps which are explained in Qt Documentation Quick MQTT Example. i am getting error while building "error : "Unknown module(s) in Qt : mqtt". How to solve this?
Thanks!
-
I am trying to use mqtt protocol in qt quick application. i have already followed the steps which are explained in Qt Documentation Quick MQTT Example. i am getting error while building "error : "Unknown module(s) in Qt : mqtt". How to solve this?
Thanks!
@arbaj-patel it looks like you need to build the Qt MQTT module first.
-
@arbaj-patel it looks like you need to build the Qt MQTT module first.
@pablo-j-rogina and install it after that
-
@arbaj-patel it looks like you need to build the Qt MQTT module first.
@pablo-j-rogina I have already cloned the git reposetry from here and builded. Now we need to add build files in to aur main project if i am not wrong?
-
@vladstelmahovsky sorry i didnt get it. how to install mqtt?
Thanks
-
Hi @Arbaj-Patel,
You can install follow these commands:
/home/nexle-user/Qt5.13.1/5.13.1/gcc_64/bin/qmake -query QT_INSTALL_LIBS
(here I build mqtt for desktop so I use qmake inside gcc_64, if you want to build for other platform, just choose correct qmake ) . And this is my output /home/nexle-user/Qt5.13.1/5.13.1/gcc_64/lib, then cd to there:
cd /home/nexle-user/Qt5.13.1/5.13.1/gcc_64/lib
git clone git://code.qt.io/qt/qtmqtt.git
cd qtmqtt
/home/nexle-user/Qt5.13.1/5.13.1/gcc_64/bin/qmake
make
make install
(if has errors, please trysudo make install
)
Thank you. -
Hi @Arbaj-Patel,
You can install follow these commands:
/home/nexle-user/Qt5.13.1/5.13.1/gcc_64/bin/qmake -query QT_INSTALL_LIBS
(here I build mqtt for desktop so I use qmake inside gcc_64, if you want to build for other platform, just choose correct qmake ) . And this is my output /home/nexle-user/Qt5.13.1/5.13.1/gcc_64/lib, then cd to there:
cd /home/nexle-user/Qt5.13.1/5.13.1/gcc_64/lib
git clone git://code.qt.io/qt/qtmqtt.git
cd qtmqtt
/home/nexle-user/Qt5.13.1/5.13.1/gcc_64/bin/qmake
make
make install
(if has errors, please trysudo make install
)
Thank you.Hi @Quang-Phu
i am trying this and getting some issu.
till git cloning is worked fine after that when i am going to run "make" command it showing error like "no target specified and no makefile found. stop."please help me to resolve this..
thank you
-
Thank you @Quang-Phu i got the solution. Thank you all.
-
@Arbaj-Patel glad to hear that, please close this issue as solved.
Thank you!