title: QDBus signal not received
body: <p>I want to receive DBus signal in Qt application:</p>
  
  <p>receiver.h</p>
  
  <pre><code>#ifndef RECEIVER_H
  #define RECEIVER_H
  
  #include &lt;iostream&gt;
  #include &lt;QObject&gt;
  
  class Receiver : public QObject {
      Q_OBJECT
  public slots:
      void receive() {
          std::cout &lt;&lt; "Received!";
      }
  };
  
  #endif // RECEIVER_H
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QDBusConnection&gt;
  #include "receiver.h"
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
      auto recv = new Receiver;
      QDBusConnection::sessionBus().connect("com.ControllerBoard",
                                            "/com/ControllerBoard/Buttons",
                                            "com.ControllerBoard.Buttons",
                                            "PowerButtonPushed", recv, SLOT(receive()));
      return a.exec();
  }
  </code></pre>
  
  <p>Unfortunately this doesnt work, however I got signal emition listed in dbus-monitor:</p>
  
  <pre><code>signal time=1516297427.711775 sender=:1.89 -&gt; destination=(null destination) serial=313 path=/com/ControllerBoard/Buttons; interface=com.ControllerBoard.Buttons; member=PowerButtonPushed
  signal time=1516297427.807397 sender=:1.89 -&gt; destination=(null destination) serial=314 path=/com/ControllerBoard/Buttons; interface=com.ControllerBoard.Buttons; member=PowerButtonReleased
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I tried use <code>QDBusInterface</code> but it still not working. I checked <code>QDBusInterface::isValid()</code> and <code>QDBusConnection::isConnected()</code>, both returns true.</p>
  
  <p>EDIT2: It is very strange, when I ran this application with <code>QDBUS_DEBUG=1</code> i got signal emit listed in QDBus debug:</p>
  
  <pre><code>QDBusConnectionPrivate(0x7fe7780032f0) : connected successfully
  QDBusConnectionPrivate(0x7fe7780032f0) got message (signal): QDBusMessage(type=Signal, service="org.freedesktop.DBus", path="/org/freedesktop/DBus", interface="org.freedesktop.DBus", member="NameAcquired", signature="s", contents=(":1.104") )
  QDBusConnectionPrivate(0x7fe7780032f0) sending message: QDBusMessage(type=MethodCall, service="org.freedesktop.DBus", path="/org/freedesktop/DBus", interface="org.freedesktop.DBus", member="GetNameOwner", signature="", contents=("com.ControllerBoard") )
  QDBusConnectionPrivate(0x7fe7780032f0) got message reply: QDBusMessage(type=MethodReturn, service="org.freedesktop.DBus", signature="s", contents=(":1.98") )
  QDBusConnectionPrivate(0x7fe7780032f0) sending message: QDBusMessage(type=MethodCall, service="com.ControllerBoard", path="/com/ControllerBoard/Buttons", interface="org.freedesktop.DBus.Introspectable", member="Introspect", signature="", contents=() )
  QDBusConnectionPrivate(0x7fe7780032f0) got message reply: QDBusMessage(type=MethodReturn, service=":1.98", signature="s", contents=("&lt;!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"&gt;
  &lt;node&gt;
    &lt;interface name="com.ControllerBoard.Buttons"&gt;
      &lt;signal name="PowerButtonPushed"/&gt;
      &lt;signal name="PowerButtonReleased"/&gt;
      &lt;signal name="ScalesButtonPushed"/&gt;
      &lt;signal name="ScalesButtonReleased"/&gt;
      &lt;signal name="TimerButtonPushed"/&gt;
      &lt;signal name="TimerButtonReleased"/&gt;
    &lt;/interface&gt;
    &lt;interface name="org.freedesktop.DBus.Properties"&gt;
      &lt;method name="Get"&gt;
        &lt;arg name="interface_name" type="s" direction="in"/&gt;
        &lt;arg name="property_name" type="s" direction="in"/&gt;
        &lt;arg name="value" type="v" direction="out"/&gt;
      &lt;/method&gt;
      &lt;method name="Set"&gt;
        &lt;arg name="interface_name" type="s" direction="in"/&gt;
        &lt;arg name="property_name" type="s" direction="in"/&gt;
        &lt;arg name="value" type="v" direction="in"/&gt;
      &lt;/method&gt;
      &lt;method name="GetAll"&gt;
        &lt;arg name="interface_name" type="s" direction="in"/&gt;
        &lt;arg name="values" type="a{sv}" direction="out"/&gt;
        &lt;annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/&gt;
      &lt;/method&gt;
      &lt;signal name="PropertiesChanged"&gt;
        &lt;arg name="interface_name" type="s" direction="out"/&gt;
        &lt;arg name="changed_properties" type="a{sv}" direction="out"/&gt;
        &lt;annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/&gt;
        &lt;arg name="invalidated_properties" type="as" direction="out"/&gt;
      &lt;/signal&gt;
    &lt;/interface&gt;
    &lt;interface name="org.freedesktop.DBus.Introspectable"&gt;
      &lt;method name="Introspect"&gt;
        &lt;arg name="xml_data" type="s" direction="out"/&gt;
      &lt;/method&gt;
    &lt;/interface&gt;
    &lt;interface name="org.freedesktop.DBus.Peer"&gt;
      &lt;method name="Ping"/&gt;
      &lt;method name="GetMachineId"&gt;
        &lt;arg name="machine_uuid" type="s" direction="out"/&gt;
      &lt;/method&gt;
    &lt;/interface&gt;
  &lt;/node&gt;
  ") )
  QDBusConnectionPrivate(0x7fe7780032f0) Adding rule: "type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='com.ControllerBoard'"
  QDBusConnectionPrivate(0x7fe7780032f0) Adding rule: "type='signal',sender='com.ControllerBoard',path='/com/ControllerBoard/Buttons',interface='com.ControllerBoard.Buttons',member='PowerButtonPushed'"
  QDBusConnectionPrivate(0x7fe7780032f0) sending message: QDBusMessage(type=MethodCall, service="org.freedesktop.DBus", path="/org/freedesktop/DBus", interface="org.freedesktop.DBus", member="GetNameOwner", signature="", contents=("com.ControllerBoard") )
  QDBusConnectionPrivate(0x7fe7780032f0) got message reply: QDBusMessage(type=MethodReturn, service="org.freedesktop.DBus", signature="s", contents=(":1.98") )
  QDBusConnectionPrivate(0x7fe7780032f0) Watching service "com.ControllerBoard" for owner changes (current owner: ":1.98" )
  QDBusConnectionPrivate(0x7fe7780032f0) got message (signal): QDBusMessage(type=Signal, service=":1.98", path="/com/ControllerBoard/Buttons", interface="com.ControllerBoard.Buttons", member="PowerButtonPushed", signature="", contents=() )
  </code></pre>