1

I am using Qt DBus to monitor signals. However, as the main Qt thread is often busy with a long running task (a design I currently cannot change), there is a long delay between sending a qt-dbus message by another program an the slot being called. How can I reduce this delay?

I connect a slot to be called when a signal is received something like so:

#include <QtDBus>
#include <QString>
#include <QObject>

MyDbus : public QObject {
public:
    MyDbus() {
        QDBusConnection::systemBus().connect("", "path", "interface.com", "member", this, SLOT(mySlot(QString)));
    }

private slots:
    void mySlot(QString& message) const {
        // Do something.
    }
 };

Using Qt 4.8.6.

Kevin
  • 4,070
  • 4
  • 45
  • 67

0 Answers0