title: Qt Signals and slots - No matching function for call
body: <p>I am learning QT and am trying to get my signals and slots working. I am having no luck.
  Here is my Main</p>
  
  <pre><code>    int main(int argc, char** argv) {
        QApplication app(argc, argv);
  
        FilmInput fi;
        FilmWriter fw;
        QObject::connect (&amp;fi-&gt;okButton, SIGNAL( clicked() ), &amp;fi, SLOT( okButtonClicked() ) 
  
      ); //Error received Base operand of '-&gt;' has non-pointer type 'FilmInput'
       QObject::connect(&amp;fi,SIGNAL(obtainFilmData(QVariant*)),&amp;fw,SLOT(saveFilmData(QVariant*)));
  //Error received No matching function for call to 'QObject::connect(Filminput*, const     char*, FilmWriter*, const char*)
        fi.show();
        return app.exec();
  
      }
  </code></pre>
  
  <p>and here is my sad attempt at signals and slots:</p>
  
  <p>FilmInput.h</p>
  
  <pre><code>public:
          FilmInput();
          void okButtonClicked();
      QPushButton* okButton;
  signals:
          void obtainFilmData(Film *film);
  Here is FilmWriter.h
  
  public slots:
      int saveFilm(Film &amp;f);
  
  Here is Film Input.cpp
  
  
  void FilmInput::okButtonClicked(){
      Film *aFilm=new Film();
      aFilm-&gt;setDirector(this-&gt;edtDirector-&gt;text());
      emit obtainFilmData(aFilm);
  
  }
  </code></pre>
  
  <p>Here is FilmWriter.cpp</p>
  
  <pre><code>void FilmInput::okButtonClicked(){
      Film *aFilm=new Film();
      aFilm-&gt;setDirector(this-&gt;edtDirector-&gt;text());
      emit obtainFilmData(aFilm);
  
  }
  </code></pre>
  
  <p>Please assist me in getting the signals and slots to work, I have spent hours but am no closer to getting it working. I have added the errors received in my comments above.</p>
  
  <p>Regards</p>