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 to use Signals & Slots to make Inter-Process Communication in Qt ?
Forum Updated to NodeBB v4.3 + New Features

How to use Signals & Slots to make Inter-Process Communication in Qt ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 5 Posters 2.5k 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.
  • A Offline
    A Offline
    Alex42
    wrote on last edited by
    #1

    I want to develop a software constituted of several module, for this, My goal is to communicate in a distance between Modules ( in different computers )

    In other way I want to throw signals from Module to another Module and execute the SLOTs in another Module ( communication between signals and slots in distant between applications ( Module of my software) in different computers)
    after reading about Inter-Process Communication in Qt,
    https://doc.qt.io/qt-5/ipc.html
    I realized that the only way to reach my goal is to use the Qt D-bus,
    Unfortunately after trying to use it under windows , ( i found it very very hard,)
    my questions
    is it possible to do what i want to do (use Signals and slots for communication between Modules of my software in distance in different computers ) with another system like ( TCP/IP, QProcess, .. etc , on Qt) ?

    feedback, Your advice and your ideas are welcome

    Thank you for your comments.

    jsulmJ KroMignonK 2 Replies Last reply
    0
    • A Alex42

      I want to develop a software constituted of several module, for this, My goal is to communicate in a distance between Modules ( in different computers )

      In other way I want to throw signals from Module to another Module and execute the SLOTs in another Module ( communication between signals and slots in distant between applications ( Module of my software) in different computers)
      after reading about Inter-Process Communication in Qt,
      https://doc.qt.io/qt-5/ipc.html
      I realized that the only way to reach my goal is to use the Qt D-bus,
      Unfortunately after trying to use it under windows , ( i found it very very hard,)
      my questions
      is it possible to do what i want to do (use Signals and slots for communication between Modules of my software in distance in different computers ) with another system like ( TCP/IP, QProcess, .. etc , on Qt) ?

      feedback, Your advice and your ideas are welcome

      Thank you for your comments.

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

      @Alex42 Signals and slots only work in one process, not across different processes.
      But you can use any IPC and implement your own signals/slots on top of it.
      For exaple one process sends some data/command to another one and in that process a signal is emitted as soon as this data/command arrives.

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

      1 Reply Last reply
      4
      • D Offline
        D Offline
        DannySW
        wrote on last edited by
        #3

        I dont think that is how it works. The signals and slots will only work within the compiled application. You can send data between the processes using IPC and can have signals and slots to manage the communication but they will be contained within the process.

        Another option for IPC is Sockets, have a look at the local fortune server example.

        1 Reply Last reply
        1
        • A Alex42

          I want to develop a software constituted of several module, for this, My goal is to communicate in a distance between Modules ( in different computers )

          In other way I want to throw signals from Module to another Module and execute the SLOTs in another Module ( communication between signals and slots in distant between applications ( Module of my software) in different computers)
          after reading about Inter-Process Communication in Qt,
          https://doc.qt.io/qt-5/ipc.html
          I realized that the only way to reach my goal is to use the Qt D-bus,
          Unfortunately after trying to use it under windows , ( i found it very very hard,)
          my questions
          is it possible to do what i want to do (use Signals and slots for communication between Modules of my software in distance in different computers ) with another system like ( TCP/IP, QProcess, .. etc , on Qt) ?

          feedback, Your advice and your ideas are welcome

          Thank you for your comments.

          KroMignonK Offline
          KroMignonK Offline
          KroMignon
          wrote on last edited by
          #4

          @Alex42 said in How to use Signals & Slots to make Inter-Process Communication in Qt ?:

          feedback, Your advice and your ideas are welcome
          Thank you for your comments.

          Take a look at Qt Remote Objects ==> https://doc.qt.io/qt-5/qtremoteobjects-index.html
          Maybe it is what you are looking for.

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          1 Reply Last reply
          6
          • A Offline
            A Offline
            Alex42
            wrote on last edited by
            #5

            @jsulm @DannySW @KroMignon : thank you very much for your comments , i found them very useful ,
            Maybe someone among you already use QT DBUS on Windows, I'm Trying to Run dbus daemon on Windows, Unfortunately Without Success,
            I already asked this question in another topic but unanswered,

            https://forum.qt.io/topic/131841/qt-d-bus-error-how-to-use-qt-d-bus-under-windows

            KroMignonK 1 Reply Last reply
            0
            • A Alex42

              @jsulm @DannySW @KroMignon : thank you very much for your comments , i found them very useful ,
              Maybe someone among you already use QT DBUS on Windows, I'm Trying to Run dbus daemon on Windows, Unfortunately Without Success,
              I already asked this question in another topic but unanswered,

              https://forum.qt.io/topic/131841/qt-d-bus-error-how-to-use-qt-d-bus-under-windows

              KroMignonK Offline
              KroMignonK Offline
              KroMignon
              wrote on last edited by KroMignon
              #6

              @Alex42 said in How to use Signals & Slots to make Inter-Process Communication in Qt ?:

              Maybe someone among you already use QT DBUS on Windows,

              Qt DBus requires DBus, which is not available on Windows. It is a Linux only solution AFAIK. (cf: https://doc.qt.io/qt-5/qtdbus-module.htm)

              e4d08d66-6196-4a38-8073-d37e05eb4a20-image.png

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              A jsulmJ 2 Replies Last reply
              0
              • KroMignonK KroMignon

                @Alex42 said in How to use Signals & Slots to make Inter-Process Communication in Qt ?:

                Maybe someone among you already use QT DBUS on Windows,

                Qt DBus requires DBus, which is not available on Windows. It is a Linux only solution AFAIK. (cf: https://doc.qt.io/qt-5/qtdbus-module.htm)

                e4d08d66-6196-4a38-8073-d37e05eb4a20-image.png

                A Offline
                A Offline
                Alex42
                wrote on last edited by
                #7

                @KroMignon, thank you again ,
                I have Qt DBus module properly installed on Windows which is good news. however, for it to properly work i need to have a dbus daemon running on Windows which by default isn't there. Windows doesn't support DBus natively :Yes . But we can use Qt D-Bus under windows
                for more information , i let you take a look on these links
                https://forum.qt.io/topic/124299/qt-d-bus-on-windows

                https://stackoverflow.com/questions/34342061/specify-dbus-session-address-on-windows

                https://stackoverflow.com/questions/29702421/qtdbus-is-not-working-in-qt5-4-1-on-windows-7

                artwawA 1 Reply Last reply
                0
                • A Alex42

                  @KroMignon, thank you again ,
                  I have Qt DBus module properly installed on Windows which is good news. however, for it to properly work i need to have a dbus daemon running on Windows which by default isn't there. Windows doesn't support DBus natively :Yes . But we can use Qt D-Bus under windows
                  for more information , i let you take a look on these links
                  https://forum.qt.io/topic/124299/qt-d-bus-on-windows

                  https://stackoverflow.com/questions/34342061/specify-dbus-session-address-on-windows

                  https://stackoverflow.com/questions/29702421/qtdbus-is-not-working-in-qt5-4-1-on-windows-7

                  artwawA Offline
                  artwawA Offline
                  artwaw
                  wrote on last edited by
                  #8

                  @Alex42 it would be more useful to possibly everyone if you contain your struggle to one single thread. In the other thread I have proposed to you different solution, other user also gave the example from Qt how to achieve that.

                  For more information please re-read.

                  Kind Regards,
                  Artur

                  A 1 Reply Last reply
                  0
                  • artwawA artwaw

                    @Alex42 it would be more useful to possibly everyone if you contain your struggle to one single thread. In the other thread I have proposed to you different solution, other user also gave the example from Qt how to achieve that.

                    A Offline
                    A Offline
                    Alex42
                    wrote on last edited by
                    #9

                    @artwaw thank you for your answers i see that ,
                    These are two different questions, the other question it's about how to run dbus-daemon under windows, and here we are talking about signal and slots making inter-Process in Qt
                    Just to give more information for those who are not familiar with QT D-bus, I attach links with previous communications

                    artwawA 1 Reply Last reply
                    0
                    • A Alex42

                      @artwaw thank you for your answers i see that ,
                      These are two different questions, the other question it's about how to run dbus-daemon under windows, and here we are talking about signal and slots making inter-Process in Qt
                      Just to give more information for those who are not familiar with QT D-bus, I attach links with previous communications

                      artwawA Offline
                      artwawA Offline
                      artwaw
                      wrote on last edited by
                      #10

                      @Alex42 said in How to use Signals & Slots to make Inter-Process Communication in Qt ?:

                      how to run dbus-daemon under windows

                      As it has been explained to you, the best solution is to not run. There are some solutions as you can see, but getting them to work is tedious, as you experience it yourself. Should you think of deploying your program to other machines the complexity of process dependencies of your software grows significantly.
                      I think this is the right moment to rethink your approach and ditch DBus.

                      My personal experience tells me that software made explicitly to leverage *nix systems will never run properly on the different OS architecture (here: POSIX vs Windows). You are most welcome to prove me wrong but I sincerely doubt you'll succeed.

                      For more information please re-read.

                      Kind Regards,
                      Artur

                      A 1 Reply Last reply
                      2
                      • KroMignonK KroMignon

                        @Alex42 said in How to use Signals & Slots to make Inter-Process Communication in Qt ?:

                        Maybe someone among you already use QT DBUS on Windows,

                        Qt DBus requires DBus, which is not available on Windows. It is a Linux only solution AFAIK. (cf: https://doc.qt.io/qt-5/qtdbus-module.htm)

                        e4d08d66-6196-4a38-8073-d37e05eb4a20-image.png

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

                        @KroMignon D-Bus also works on Windows, but of course one have to build and configure it for Windows.

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

                        1 Reply Last reply
                        0
                        • artwawA artwaw

                          @Alex42 said in How to use Signals & Slots to make Inter-Process Communication in Qt ?:

                          how to run dbus-daemon under windows

                          As it has been explained to you, the best solution is to not run. There are some solutions as you can see, but getting them to work is tedious, as you experience it yourself. Should you think of deploying your program to other machines the complexity of process dependencies of your software grows significantly.
                          I think this is the right moment to rethink your approach and ditch DBus.

                          My personal experience tells me that software made explicitly to leverage *nix systems will never run properly on the different OS architecture (here: POSIX vs Windows). You are most welcome to prove me wrong but I sincerely doubt you'll succeed.

                          A Offline
                          A Offline
                          Alex42
                          wrote on last edited by
                          #12

                          @artwaw thank you for your answers ,
                          i know, maybe , i can to do what i want to do with TCP/IP, but i need certainly more and more of time to do it ,
                          I thought that Qt D-Bus will win me time, since we have a lot of class Q D-Bus , who can do the work
                          Sincerely, it's the loss of not using so many courses on Windows.

                          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