title: QT Widget Slot Call Not Activated by Separate Thread Signal
body: <p>I have 5 classes that interact (maintaining professionally, not author).  My problem is that the code that is emitting the signal (there is just one, code below) is never activating the slot (MyWidget::HandleMeasurementChanged).  This system has a large degree of complexity.  I have tried to reduce that, but think the complexity likely contributes to the problem.  There is also a high rate of calls to Observer::notify, but most of these will get filtered out by code that I have not posted here and the Emit calls are fairly rare.  If anyone could help point me to why the slot is not getting activated, I'd really appreciate it.  It is almost acting like the MyWidget class instance is not processing its event loop.  I have had a little success setting the connect type to Direct Connection, but since the emit is in a separate thread and the production code for the slot will update the UI I have ruled that out as a final solution.</p>
  
  <pre><code>class IObserver { public: virtual void notify()=0; };
  </code></pre>
  
  <hr>
  
  <pre><code>class ExternalMeasurement { ... };
  class Measurement { public: Measurement(ExternalMeasurement source); };
  </code></pre>
  
  <hr>
  
  <pre><code>class Observer : public QThread, public IObserver
  {
  signals:
     void MeasurementChanged(boost::shared_ptr&lt;Measurement&gt; measurement);   
  public:
     //called by 3rd party in separate thread
     virtual void notify(ExternalMeasurement measurement)
     {
        _measurement_ = 
             boost::shared_ptr&lt;Measurement&gt;(new Measurement(measurement));
        emit MeasurementChanged(_measurement);
     }
  private:
     boost::shared_ptr&lt;Measurement&gt; _measurement_;
  };
  </code></pre>
  
  <hr>
  
  <pre><code>class MyWidget : public QWidget
  {
  private:
     Component _component_;
  public slots:
     void HandleMeasurementChanged(boost::shared_ptr&lt;Measurement&gt; measurement);
  public:
     MyWidget(Component * component_)
  };
  
  MyWidget::MyWidget(Component * component_)
  {
     _component_ = component_;
     connect(
        _component_-&gt;_observer_, 
        MeasurementChanged(boost::shared_ptr&lt;Measurement&gt; measurement),
        this,
        HandleMeasurementChanged(boost::shared_ptr&lt;Measurement&gt; measurement));
  }
  </code></pre>
  
  <hr>
  
  <pre><code>class Component
  {
  private:
     QApplication * _application_;
     MyWidget * _widget_;
     Observer * _observer_;
  public:
     void MainFunc();
  }
  
  void Component::MainFunc()
  {
     _observer_ = new Observer();
     ...
     _application_ = new QApplication(...);
     ...
     _widget_ = new MyWidget(...);
     ...
     _widget_-&gt;show();
     _application_-&gt;exec();
  }
  </code></pre>