Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to use mqtt client class in qml?
QtWS25 Last Chance

How to use mqtt client class in qml?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
9 Posts 4 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arbaj Patel
    wrote on last edited by
    #1

    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!

    Pablo J. RoginaP 1 Reply Last reply
    0
    • A Arbaj Patel

      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!

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @arbaj-patel it looks like you need to build the Qt MQTT module first.

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      V A 2 Replies Last reply
      2
      • Pablo J. RoginaP Pablo J. Rogina

        @arbaj-patel it looks like you need to build the Qt MQTT module first.

        V Offline
        V Offline
        vladstelmahovsky
        wrote on last edited by
        #3

        @pablo-j-rogina and install it after that

        1 Reply Last reply
        1
        • Pablo J. RoginaP Pablo J. Rogina

          @arbaj-patel it looks like you need to build the Qt MQTT module first.

          A Offline
          A Offline
          Arbaj Patel
          wrote on last edited by
          #4

          @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?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Arbaj Patel
            wrote on last edited by
            #5

            @vladstelmahovsky sorry i didnt get it. how to install mqtt?

            Thanks

            1 Reply Last reply
            0
            • Quang PhuQ Offline
              Quang PhuQ Offline
              Quang Phu
              wrote on last edited by Quang Phu
              #6

              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 try sudo make install )
              Thank you.

              A 1 Reply Last reply
              1
              • Quang PhuQ Quang Phu

                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 try sudo make install )
                Thank you.

                A Offline
                A Offline
                Arbaj Patel
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Arbaj Patel
                  wrote on last edited by Arbaj Patel
                  #8

                  Thank you @Quang-Phu i got the solution. Thank you all.

                  1 Reply Last reply
                  0
                  • Quang PhuQ Offline
                    Quang PhuQ Offline
                    Quang Phu
                    wrote on last edited by
                    #9

                    @Arbaj-Patel glad to hear that, please close this issue as solved.
                    Thank you!

                    1 Reply Last reply
                    2

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved