title: Qt UI Slot isn't called by a signal inherited from a base class
body: <p>I'm stumbling on a dumb problem and i'm quite new to Qt.</p>
  
  <p>I have a class (<em>SoundSampler</em>) who inherit a signal from a base class (<em>BaseSampler</em>) and this signal is connected in the UI constructor (<em>MainWindow</em>) to a slot in the UI (<em>sampleAvailable()</em>).</p>
  
  <h2>The problem:</h2>
  
  <p>Even thought the connection happend properly (<em>connect()</em> returns true in the UI class and <em>isSignalconnected</em> returns also true in the <em>SoundSampler</em> class),
  the slot is never called.
  .................................................................................</p>
  
  <p>Here is my code (trimmed to the essentials):</p>
  
  <p><strong>BaseSampler</strong></p>
  
  <pre><code>class BaseSampler : public QObject
  {
      Q_OBJECT
  public:
      explicit BaseSampler(QObject *parent = 0);
      void getSample();
  
  signals:
      void sampleAvailable(QByteArray *returnSample);
  public slots:
      virtual void getSample() = 0;
  
  protected:
      QByteArray *mSample;
  };
  </code></pre>
  
  <p><strong>SoundSampler</strong></p>
  
  <pre><code>class SoundSampler : public BaseSampler
  {
      Q_OBJECT
  public:
      SoundSampler();
  
  signals:
  
  public slots:
      void stopRecording();
      void getSample();
  
  private:
      QAudioInput *mAudioInput;
      QBuffer *mBuffer;
  };
  </code></pre>
  
  <p>.................................................................................</p>
  
  <pre><code>void SoundSampler::stopRecording(){
      ...
      mSample-&gt;append("test");
      emit sampleAvailable(mSample);
      qDebug() &lt;&lt; "Signal emmited"; //this get properly displayed in output
  }
  </code></pre>
  
  <p><strong>MainWindow</strong></p>
  
  <pre><code>class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
  
  public slots:
      void sampleHandler(QByteArray*);
  
  private:
      QWidget *window;
      SoundSampler *ss;
  };
  </code></pre>
  
  <p>.................................................................................</p>
  
  <pre><code>MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
  
      window = new QWidget();
      ss = new SoundSampler();
  
      boutonStart = new QPushButton(tr("&amp;Start"));
  
      layout = new QHBoxLayout;
      layout-&gt;addWidget(boutonStart);
  
      window-&gt;setLayout(layout);
      window-&gt;show();
  
      connect(boutonStart, SIGNAL(clicked()),
              ss, SLOT(getSample())); //This connection works
      //The getSample() starts a Timer witch successfully calls the stopRecording slot
  
      connect(ss, SIGNAL(sampleAvailable(QByteArray*)),
              this, SLOT(sampleHandler(QByteArray*))); //This connection should work
      //The connect returns true, indicating the connection happend.
  
  }
  
  //This slot is never called.
  void MainWindow::sampleHandler(QByteArray *sample){
      qDebug() &lt;&lt; "Passed Value: " &lt;&lt; *sample;
  }
  </code></pre>