QObjects and QtDBus



  • Hey there,

    I have a question and I hope you can help me out.

    I have an application with a QML UI with different list views etc.
    Lets say I have a list of people who are online in a network, I have a class CFoo, which returns me a specific Person.

    @
    CPerson {
    CPerson();
    QString getName();
    int getAge();
    }

    class CFoo {
    Q_PROPERTY(CPerson person READ getPerson NOTIFY personChanged)
    public:
    const CPerson> & getPerson();

    Q_SIGNAL:
    void personChanged();
    }
    @

    I need to register CFoo in the QML context to call its member. But I also have to register CPerson in the QML context, so it has to subclass QObject, otherwise I can't access its getters.

    On the other hand I need to expose CFoo to a DBus session. But is it somehow possible to use a class with QObject as base class as an argument in a DBus message?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.