Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I use the QtMqtt code?
Qt 6.11 is out! See what's new in the release blog

How can I use the QtMqtt code?

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 1.4k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    pabloleibo
    wrote on last edited by
    #1

    Re: How can I use the QtMqtt code?
    Hi, I'm trying to use the qtmqtt library, but I can't make it work.
    I modified the source code as said in the referenced topic (deleting all <QtMqtt/ prefixes), but I obtained this:

    captura.png

    It says that, i.e.,
    'class QList<QMqttTopicName>' has no member named 'resize'; did you mean 'size'?
    m_receiveAliases.resize(m_clientPrivate->m_serverConnectionProperties.maximumTopicAlias());
    ^~~~~~
    size

    Can you help me? I'm using Qt 5.15.0
    Thanks!

    jsulmJ Pablo J. RoginaP 2 Replies Last reply
    0
    • P pabloleibo

      Re: How can I use the QtMqtt code?
      Hi, I'm trying to use the qtmqtt library, but I can't make it work.
      I modified the source code as said in the referenced topic (deleting all <QtMqtt/ prefixes), but I obtained this:

      captura.png

      It says that, i.e.,
      'class QList<QMqttTopicName>' has no member named 'resize'; did you mean 'size'?
      m_receiveAliases.resize(m_clientPrivate->m_serverConnectionProperties.maximumTopicAlias());
      ^~~~~~
      size

      Can you help me? I'm using Qt 5.15.0
      Thanks!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @pabloleibo The error messages are not related to QtMqtt.
      QList does not have resize() method.
      And QStringView does not have method split().

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • P pabloleibo

        Re: How can I use the QtMqtt code?
        Hi, I'm trying to use the qtmqtt library, but I can't make it work.
        I modified the source code as said in the referenced topic (deleting all <QtMqtt/ prefixes), but I obtained this:

        captura.png

        It says that, i.e.,
        'class QList<QMqttTopicName>' has no member named 'resize'; did you mean 'size'?
        m_receiveAliases.resize(m_clientPrivate->m_serverConnectionProperties.maximumTopicAlias());
        ^~~~~~
        size

        Can you help me? I'm using Qt 5.15.0
        Thanks!

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

        @pabloleibo said in How can I use the QtMqtt code?:

        I'm trying to use the qtmqtt library

        did you build and install the Qt MQTT module?

        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

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pabloleibo
          wrote on last edited by
          #4

          Hi to all!

          @jsulm said in How can I use the QtMqtt code?:

          @pabloleibo The error messages are not related to QtMqtt.
          QList does not have resize() method.
          And QStringView does not have method split().

          Yes, I don't know why!

          @Pablo-J-Rogina said in How can I use the QtMqtt code?:

          @pabloleibo said in How can I use the QtMqtt code?:

          I'm trying to use the qtmqtt library

          did you build and install the Qt MQTT module?

          Yes, I tried to build QtMqtt from the github repo.

          Thanks!

          Pablo J. RoginaP 1 Reply Last reply
          0
          • P pabloleibo

            Hi to all!

            @jsulm said in How can I use the QtMqtt code?:

            @pabloleibo The error messages are not related to QtMqtt.
            QList does not have resize() method.
            And QStringView does not have method split().

            Yes, I don't know why!

            @Pablo-J-Rogina said in How can I use the QtMqtt code?:

            @pabloleibo said in How can I use the QtMqtt code?:

            I'm trying to use the qtmqtt library

            did you build and install the Qt MQTT module?

            Yes, I tried to build QtMqtt from the github repo.

            Thanks!

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

            @pabloleibo said in How can I use the QtMqtt code?:

            I tried to build QtMqtt from the github repo

            And?
            did you succeed installing it properly?

            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

            1 Reply Last reply
            0
            • P Offline
              P Offline
              pabloleibo
              wrote on last edited by
              #6

              Finally, I resolve this issue.
              For all who read this topic, please be careful on which repo do you download. You have to change the branch and not download the default one. Select the correct qt version and not the master branch!
              Thanks for all who helped!

              C 1 Reply Last reply
              1
              • P pabloleibo

                Finally, I resolve this issue.
                For all who read this topic, please be careful on which repo do you download. You have to change the branch and not download the default one. Select the correct qt version and not the master branch!
                Thanks for all who helped!

                C Offline
                C Offline
                churro
                wrote on last edited by
                #7

                @pabloleibo Hey, after googling and searching for a solution to my problem which looks exactly like what you had, I came to your answer.

                I'm a starter. Could you please explain to me how you managed to solve this issue? I get the same errors and I think I downloaded the wrong repo after reading your answer.
                Thanks in advance.

                Pablo J. RoginaP 1 Reply Last reply
                0
                • C churro

                  @pabloleibo Hey, after googling and searching for a solution to my problem which looks exactly like what you had, I came to your answer.

                  I'm a starter. Could you please explain to me how you managed to solve this issue? I get the same errors and I think I downloaded the wrong repo after reading your answer.
                  Thanks in advance.

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

                  @churro

                  You have to change the branch and not download the default one. Select the correct qt version and not the master branch!

                  You may want to look at step #16 from this guide

                  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

                  1 Reply Last reply
                  0

                  • Login

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