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. Sending and receiving data or variables value from a project to other project.(Not dialog)
Forum Updated to NodeBB v4.3 + New Features

Sending and receiving data or variables value from a project to other project.(Not dialog)

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 613 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.
  • F Offline
    F Offline
    Faruq
    wrote on last edited by
    #1

    Hi everyone! For a start, I have a dialog that is ready to receive and display data/variables. One way to receive/display that I know is to key in the variables values in the header file in the same Qt application/dialog/project. (Not sure if its even the right method to begin). Thus I started to ponder, what if I want to send these variable values from another application/dialog/project (Not under the same project file, which utilise signals and slots) .

    For an instance, I have B(Receiving) . Thus, how do I send variables from A (with internet or without internet)? My aim is to make a dialog that solely receive and a totally separate dialog (not interlinked with the first) to send. Thank you and sorry if I got the terms all messed up.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      There are many ways in which you can send data from one application to another.

      These include:

      • QtRemoteObjects
      • using network (QTcpSocket, QUdpSocket, maybe QNetworkAccessManager if one of your app exposes HTTP content)
      • using network via localhost (so you don't need 2 separate PCs for this, you can communicate within the same machine)
      • DBus
      • Bluetooth
      • etc.

      In order to send and receive the data, you can pack and unpack it using:

      • QDataStream
      • QJson
      • QXml* classes
      • ProtoBuf

      (Z(:^

      1 Reply Last reply
      6
      • F Offline
        F Offline
        Faruq
        wrote on last edited by
        #3

        @sierdzio Hi, sorry for the late reply and thank you for your reply. I am looking at 3rd point where you said "using network via localhost....". Is there any example for this? I am interested to try with 2 different PC and within the same PC.

        jsulmJ 1 Reply Last reply
        0
        • F Faruq

          @sierdzio Hi, sorry for the late reply and thank you for your reply. I am looking at 3rd point where you said "using network via localhost....". Is there any example for this? I am interested to try with 2 different PC and within the same PC.

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

          @Faruq It's same as point 2 but if on same machine you simply use 127.0.0.1 as IP...

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

          1 Reply Last reply
          3
          • F Offline
            F Offline
            Faruq
            wrote on last edited by
            #5

            @jsulm alright, thanks to you and everyone. will ask again if I encounter any problem.

            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