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. Qt D-Bus on Windows
Forum Updated to NodeBB v4.3 + New Features

Qt D-Bus on Windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 5 Posters 5.1k 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.
  • N Offline
    N Offline
    nsourl
    wrote on last edited by nsourl
    #1

    Hi,

    I was looking for a Qt IPC mechanism to use in my cross-platform project and I noticed that D-Bus is quite useful and convenient way to do that.

    https://doc.qt.io/qt-5/qtdbus-index.html

    https://doc.qt.io/qt-5/ipc.html

    But I am not sure if it is supported and works flawlessly on Windows systems and I was wondering if someone has used it for a Qt project and let me know.

    Based on the following link from freedesktop it seems that a Windows port implementation exists but I couldn't find any reference for using it in Windows programs.

    https://www.freedesktop.org/wiki/Software/dbus/

    Since it's crucial for my Qt project to be cross-platform, Qt D-Bus is safe to be used in my case or should I consider using QLocalServer/QLocalSocket or SharedMemory ? Any ideas ?

    Thanks.

    jsulmJ 2 Replies Last reply
    0
    • N nsourl

      Hi,

      I was looking for a Qt IPC mechanism to use in my cross-platform project and I noticed that D-Bus is quite useful and convenient way to do that.

      https://doc.qt.io/qt-5/qtdbus-index.html

      https://doc.qt.io/qt-5/ipc.html

      But I am not sure if it is supported and works flawlessly on Windows systems and I was wondering if someone has used it for a Qt project and let me know.

      Based on the following link from freedesktop it seems that a Windows port implementation exists but I couldn't find any reference for using it in Windows programs.

      https://www.freedesktop.org/wiki/Software/dbus/

      Since it's crucial for my Qt project to be cross-platform, Qt D-Bus is safe to be used in my case or should I consider using QLocalServer/QLocalSocket or SharedMemory ? Any ideas ?

      Thanks.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      1
      • X Offline
        X Offline
        xtofl
        wrote on last edited by
        #3

        D-Bus is definitely not portable.

        In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.

        The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.

        jsulmJ Christian EhrlicherC N 3 Replies Last reply
        0
        • N nsourl

          Hi,

          I was looking for a Qt IPC mechanism to use in my cross-platform project and I noticed that D-Bus is quite useful and convenient way to do that.

          https://doc.qt.io/qt-5/qtdbus-index.html

          https://doc.qt.io/qt-5/ipc.html

          But I am not sure if it is supported and works flawlessly on Windows systems and I was wondering if someone has used it for a Qt project and let me know.

          Based on the following link from freedesktop it seems that a Windows port implementation exists but I couldn't find any reference for using it in Windows programs.

          https://www.freedesktop.org/wiki/Software/dbus/

          Since it's crucial for my Qt project to be cross-platform, Qt D-Bus is safe to be used in my case or should I consider using QLocalServer/QLocalSocket or SharedMemory ? Any ideas ?

          Thanks.

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

          @nsourl Did you try to use DBus on Windows? If I add "QT += dbus" to pro file qmake does not complain, so it looks like it is available on Windows. But I did not use it, so don't know whether it really works.

          N 1 Reply Last reply
          0
          • X xtofl

            D-Bus is definitely not portable.

            In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.

            The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.

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

            @xtofl said in Qt D-Bus on Windows:

            D-Bus is definitely not portable

            Are you sure? The third link from OP says the opposite. Windows port is already part of official repo. And: "DBus on Windows is used by KDE, Gnome and commercial applications.".

            1 Reply Last reply
            1
            • X xtofl

              D-Bus is definitely not portable.

              In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.

              The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @xtofl said in Qt D-Bus on Windows:

              D-Bus is definitely not portable.

              This is wrong. It worked already ten years ago on windows...

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              2
              • jsulmJ jsulm

                @nsourl Did you try to use DBus on Windows? If I add "QT += dbus" to pro file qmake does not complain, so it looks like it is available on Windows. But I did not use it, so don't know whether it really works.

                N Offline
                N Offline
                nsourl
                wrote on last edited by
                #7

                @jsulm @Christian-Ehrlicher after I posted this, I tried to run a d-bus example on Windows. It compiles fine but when I am trying to run the example...getting this error below.

                Cannot connect to the D-Bus session bus.
                Please check your system settings and try again.
                QEventDispatcherWin32::wakeUp: Failed to post a message
                

                I installed D-Bus on Windows through a ready made installer found in Google archives but it seems to be old version and deprecated.

                https://code.google.com/archive/p/dbus-windows-installer/downloads

                Do you think it's a better idea to build from sources using the official dbus repository ?

                https://gitlab.freedesktop.org/dbus/dbus

                As @xtofl said about gRPC, any ideas? It could be useful somehow ?

                Thanks.

                jsulmJ 1 Reply Last reply
                0
                • X xtofl

                  D-Bus is definitely not portable.

                  In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.

                  The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.

                  N Offline
                  N Offline
                  nsourl
                  wrote on last edited by
                  #8

                  @xtofl said in Qt D-Bus on Windows:

                  D-Bus is definitely not portable.

                  In the past, I had good experience with https://grpc.io/. It is platform-independent, has a proper Interface Description Language that enforces versioning from the start.

                  The framework lets you generate stubs and adapters from the IDL, that you then can wrap in your Qt object of choice.

                  @xtofl you used gRPC for communicating large amount of data or simply exchanging lightweight messages? Any example using Qt and gRPC as a starting point reference ?

                  Thanks.

                  1 Reply Last reply
                  0
                  • Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    I did not do anything with DBus since some years so I don't know the current install procedure.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    0
                    • N nsourl

                      @jsulm @Christian-Ehrlicher after I posted this, I tried to run a d-bus example on Windows. It compiles fine but when I am trying to run the example...getting this error below.

                      Cannot connect to the D-Bus session bus.
                      Please check your system settings and try again.
                      QEventDispatcherWin32::wakeUp: Failed to post a message
                      

                      I installed D-Bus on Windows through a ready made installer found in Google archives but it seems to be old version and deprecated.

                      https://code.google.com/archive/p/dbus-windows-installer/downloads

                      Do you think it's a better idea to build from sources using the official dbus repository ?

                      https://gitlab.freedesktop.org/dbus/dbus

                      As @xtofl said about gRPC, any ideas? It could be useful somehow ?

                      Thanks.

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

                      @nsourl said in Qt D-Bus on Windows:

                      Do you think it's a better idea to build from sources using the official dbus repository ?

                      You can try to build it by yourself

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        Junyu Ke
                        wrote on last edited by Junyu Ke
                        #11

                        May be you can try this(Windows port)
                        freedesktop.org

                        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