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. Network programming with Qt
Forum Updated to NodeBB v4.3 + New Features

Network programming with Qt

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 3 Posters 743 Views 2 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.
  • tomyT Offline
    tomyT Offline
    tomy
    wrote on last edited by tomy
    #1

    Hi all,

    1. I wish to get my feet wet and start learning network programming using Qt.
      Do you agree that I start from here? If so, what example is better to stick to as the first one?
      Or do you have a better idea, please?

    2. The next question is that, those examples and that link are of QtWidgets. What if I like to learn Qt network programming to be used for QtQuick apps, please?
      Thanks in advance.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      In addition to the documentation examples, there is this wiki article that adds some more informations.

      As for QtQuick, what do you have in mind ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      tomyT 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        In addition to the documentation examples, there is this wiki article that adds some more informations.

        As for QtQuick, what do you have in mind ?

        tomyT Offline
        tomyT Offline
        tomy
        wrote on last edited by
        #3

        @SGaist

        there is this wiki article that adds some more informations.

        I explored it but for me as a starter of network programming, this seems too sophisticated!
        Don't you think the link on docs I provided has simpler examples to get started? Which one do you recommend, please?

        As for QtQuick, what do you have in mind?

        I intend to mostly stick with QtQuick generally, if I have a choice, and QtWidgets only when I have no other choice. So that was why I mentioned QtQuick. So if there's a tutorial/link to get me to get started learning Qt network programming to be doable for QtQuick apps, that will be really wonderful.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          As I said, this wiki entry is in addition to the examples.

          As for QtQuick, again, it depends on what you are going to do. You may have to implement your own classes in C++ if you want to wrap some APIs, etc.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          tomyT 1 Reply Last reply
          2
          • SGaistS SGaist

            As I said, this wiki entry is in addition to the examples.

            As for QtQuick, again, it depends on what you are going to do. You may have to implement your own classes in C++ if you want to wrap some APIs, etc.

            tomyT Offline
            tomyT Offline
            tomy
            wrote on last edited by
            #5

            I don't have any specific intention to use, but just aim to learn the API. So a simple QtQucik example in which the REST API is used will be good. The simpler the better.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              See this chapter of the Qt 6 QML book.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • GrecKoG Offline
                GrecKoG Offline
                GrecKo
                Qt Champions 2018
                wrote on last edited by
                #7

                Networking is such a broad concept that if you don't have a specific use case it's hard to give advices.

                The client code for a REST API can be very boring. see this code I made a long time ago to display the bike share network of my city as an example : https://github.com/oKcerG/MeetupSFPMMap/blob/master/main.qml the code to fetch the data is barely 10 lines (and simple ones). The model is handled via https://github.com/benlau/qsyncable ,
                don't populate data manually in a for loop like done in the QML book.

                For more advance use case you would use QNetworkAccessManager in C++, potentially with OAuth and expose a nice API to QML. Or maybe you need to use a third party lib or implement a binary protocol with QTcpSocket. Or maybe something with zmq or protobuf ...

                1 Reply Last reply
                1

                • Login

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