title: QSound error - reference?
body: <p>I'm trying to play a sound from a QSound object. I can't see why it's not working, looking at previous example</p>
  
  <p>This is the header</p>
  
  <pre><code>#ifndef ACCESSPANEL_H
  #define ACCESSPANEL_H
  
  #include &lt;QWidget&gt;
  #include "theislandmain.h"
  #include &lt;QString&gt;
  #include &lt;QtMultimedia/QSound&gt;
  
  namespace Ui {
      class accessPanel;
  }
  
  class accessPanel : public QWidget
  {
      Q_OBJECT
  
  public:
      explicit accessPanel(QWidget *parent = 0);
      ~accessPanel();
  
  
  private slots:
  
      QString getCode();
  
      void on_one_clicked();
  
      void on_two_clicked();
  
      void on_three_clicked();
  
      void on_four_clicked();
  
      void on_five_clicked();
  
      void on_six_clicked();
  
      void on_seven_clicked();
  
      void on_eight_clicked();
  
      void on_nine_clicked();
  
      void on_cancel_clicked();
  
      void on_zero_clicked();
  
      void on_confirm_clicked();
  
  private:
      Ui::accessPanel *ui;
      QString input;
      QSound *keypad;
  };
  
  #endif // ACCESSPANEL_H
  </code></pre>
  
  <p>This is the main</p>
  
  <pre><code>#include "accesspanel.h"
  #include "ui_accesspanel.h"
  #include &lt;QtMultimedia/QSound&gt;
  
  
  accessPanel::accessPanel(QWidget *parent) :
      QWidget(parent),
      ui(new Ui::accessPanel)
  {
      ui-&gt;setupUi(this);
      keypad = new QSound("../Island/Sounds/keypad.wav", this);
  }
  
  accessPanel::~accessPanel()
  {
      delete ui;
  }
  
  QString accessPanel::getCode()
  {
      return input;
  }
  
  void accessPanel::on_one_clicked()
  {
      keypad-&gt;play();
      input = input + "1";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_two_clicked()
  {
      input = input + "2";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_three_clicked()
  {
      input = input + "3";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_four_clicked()
  {
      input = input + "4";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_five_clicked()
  {
      input = input + "5";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_six_clicked()
  {
      input = input + "6";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_seven_clicked()
  {
      input = input + "7";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_eight_clicked()
  {
      input = input + "8";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_nine_clicked()
  {
      input = input + "9";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_cancel_clicked()
  {
      this-&gt;close();
      input = "";
      ui-&gt;codeDisplay-&gt;clear();
  }
  
  void accessPanel::on_zero_clicked()
  {
      input = input + "0";
      ui-&gt;codeDisplay-&gt;setText(input);
  }
  
  void accessPanel::on_confirm_clicked()
  {
      ui-&gt;codeDisplay-&gt;setText(input);
      TheIslandMain::setInput(input);
      this-&gt;close();
  }
  </code></pre>
  
  <p>I'm getting the following errors.</p>
  
  <blockquote>
    <p>accesspanel.obj:-1: error: LNK2019: unresolved external symbol
    "__declspec(dllimport) public: void _<em>thiscall QSound::play(void)"
    (</em>_imp_?play@QSound@@QAEXXZ) referenced in function "private: void
    __thiscall accessPanel::on_one_clicked(void)" (?on_one_clicked@accessPanel@@AAEXXZ)</p>
    
    <p>accesspanel.obj:-1: error: LNK2019: unresolved external symbol
    "__declspec(dllimport) public: __thiscall QSound::QSound(class QString
    const &amp;,class QObject *)"
    (_<em>imp</em>??0QSound@@QAE@ABVQString@@PAVQObject@@@Z) referenced in
    function "public: __thiscall accessPanel::accessPanel(class QWidget
    *)" (??0accessPanel@@QAE@PAVQWidget@@@Z)</p>
    
    <p>accesspanel.obj:-1: error: LNK2001: unresolved external symbol
    "public: virtual struct QMetaObject const * __thiscall
    QSound::metaObject(void)const "
    (?metaObject@QSound@@UBEPBUQMetaObject@@XZ)</p>
  </blockquote>
  
  <p>And 3 others similar to it.</p>
  
  <p>I've tried the following</p>
  
  <p><code>QSound::play("filename");</code> - same issues</p>
  
  <p>I messed around with a static reference but got something like</p>