Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Pros and cons of using Qnetwork vs sockets

    Qt for Python
    3
    6
    186
    Loading More Posts
    • 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.
    • D
      deleted256 last edited by

      I want to create a client server application using pyqt5. Not sure whether to use Qnetwork / QTcpSocket or the default sockets module with python.

      I've found tutorials online using each method but haven't found any information on which is best?

      1 Reply Last reply Reply Quote 0
      • eyllanesc
        eyllanesc last edited by

        @benyeyeye In summary: QTcpSocket and the classes that handle sockets in python are ultimately handlers of the sockets created by the OS, that is, there are no Qt-sockets or python-sockets, but each technology creates a wrapper over the native sockets of each OS. So you can use any in a general case. So by not giving any particular requirement the answer is: Anyone.

        If you want me to help you develop some work then you can write to my email: e.yllanescucho@gmal.com.

        D 1 Reply Last reply Reply Quote 0
        • D
          deleted256 @eyllanesc last edited by

          @eyllanesc Okay. Would you reccomend one or the other? (e.g if one is easier to set up / has better documentation). I have no experience with either

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            One thing for QTcpSocket, it is asynchronous as the rest of Qt so easier to integrate in your application.

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

            D 1 Reply Last reply Reply Quote 1
            • D
              deleted256 @SGaist last edited by

              @SGaist Does this mean I would not have to use threading?

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                You should not need to.

                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 Reply Quote 0
                • First post
                  Last post