Qt-interest Archive, March 2007
Emit Signals under the D-Bus
Message 1 in thread
Hello, I try build an D-Bus adapter using Qt.
It can receive messages via its slots, but it can't send one using it's signals.
For testing send and receive I use the d-bus viewer that comes with Qt.
Any ideas what goes wrong??
Here some sample code:
class BusObjekt : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface","com.Trolltech.Qt.QAktualisierung")
public:
DBusObjekt(QObject *eltern);
signals:
void sendSomething(QString fehler);
public slots:
Q_NOREPLY void getSomething(QString xml);
};
void DBusObjekt::getSomething(QString xml)
{
qDebug()<<xml;
emit sendSomething("demo");
}
I register it with:
registerObject("/",new
DBusObjekt(this),QDBusConnection::ExportAllSlots|QDBusConnection::ExportAllSignal)
And then It is shown at the dbus viewer, and I can send something to it. But the signal will not be
received at the viewer.
--
[ signature omitted ]