title: Qt "no matching function for call"
body: <p>I have</p>
  
  <pre><code>no matching function for call to 'saveLine::saveLine()'
  </code></pre>
  
  <p>error when compiling my application. The construcor is never actually called.</p>
  
  <p>saveLine class definition:</p>
  
  <pre><code>class saveLine
  {
  public:
      saveLine(QWidget *parent);
  private:
      QPushButton *selectButton, *acceptButton;
      QLabel *filePath;
      QLineEdit *allias;
  };
  </code></pre>
  
  <p>saveLine is used in another class which is defined as follows:</p>
  
  <pre><code>class MWindow : public QWidget
  {
      Q_OBJECT
  public:
      MWindow(QWidget *parent=0);
  private:
      saveLine line1;
  };
  </code></pre>
  
  <p>error points to MWindow constructor implementation</p>
  
  <pre><code>MWindow::MWindow(QWidget *parent):QWidget(parent)
  {
      this-&gt;setWindowTitle("Launcher");
      this-&gt;resize(600,600);
  }
  </code></pre>
  
  <p>What should i do? I intend to use saveLine class in a vector, to create lines at runtime.</p>
  
  <p>EDIT: i've misdeclared line1, it should read</p>
  
  <pre><code>saveLine *line1;
  </code></pre>
  
  <p>but now it gives another error</p>
  
  <pre><code>ISO C++ forbids declaration of 'saveLine' with no type
  </code></pre>
  
  <p>and</p>
  
  <pre><code>expected ';' before '*' token
  </code></pre>
  
  <p>on this line. It seems like saveLine is no longer considered a class, how so?</p>