Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7677613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:27:42+00:00 2026-05-31T17:27:42+00:00

Using the Qt DBus library, I’m having a hard time registering an object implementing

  • 0

Using the Qt DBus library, I’m having a hard time registering an object implementing multiple interfaces.

<node> 
  <interface name="x.I1"> <method name="foo"/> </interface>
  <interface name="x.I2"> <method name="bar"/> </interface>
</node>

I have an implementation of both interfaces using C++ multiple inheritance.

class Impl : public x.I1, public x.I2 {
public:
   void foo(){}
   void bar(){}
};

The qdbusxml2cpp tool generates me a DBusAdaptor for each of the interfaces, but the QDBusConnection doesn’t have a method to add an interface implementor to that object.

And I want to publish this object on a DBus service.

QDBusConnection conn=QDBusConnection::sessionBus();
conn.registerObject("/obj",new DBusAdaptor????(&myObject) );

Do I have to implement my own adaptor to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:27:43+00:00Added an answer on May 31, 2026 at 5:27 pm

    You can’t inherit from 2 QDBusAbstractAdaptor classes, because they themselves inherit from QObject which doesn’t support multiple inheritance, and from QtDBus Adaptor documentation:

    The class must also contain one Q_CLASSINFO entry with the “D-Bus Interface” name, declaring which interface it is exporting. Only one entry per class is supported.

    So you can’t implement yourself an adaptor that would support multiple interfaces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's the first time I'm using DBus so please bear with me. This is
I'm using python-dbus to interface with HAL, and I need to find a device's
I am using DBus in a project. I understand from DBus specification that for
I am using dbus to get the current playing song from Songbird Media Player
Using online interfaces to a version control system is a nice way to have
I'm currently building a program which needs to interface with the d-bus. I'm using
I'm using accessing thorough DBUS from some process. The trouble is that it runs
I have some trouble with dbus-send when using a{sv} Calling a method with in_signature='a{ss}'
there's a freedesktop.org notification system using DBUS. Looks simple enough, but I just can't
I'm using python-dbus and cherrypy to monitor USB devices and provide a REST service

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.