title: QT - multiple definitions
body: <p>i can't compile this QT program because I get this message about "multiple definition of `Dialog::status(QString const&amp;)'"</p>
  
  <p>There is some code:
  Dialog hader:</p>
  
  <pre><code>#ifndef DIALOG_H
  #define DIALOG_H
  
  #include &lt;QDialog&gt;
  
  //class QCheckBox;
  class QLabel;
  class QLineEdit;
  class QPushButton;
  
  class Dialog : public QDialog
  {
      Q_OBJECT
  
  public:
      Dialog(QWidget *parent = 0);
  signals:
      void status(const QString &amp;str);
  private slots:
      void on();
  private:
      QLabel *label;
      QLineEdit *LineEdit;
      QPushButton *button;
  };
  
  #endif // DIALOG_H
  </code></pre>
  
  <p>and implementation file:</p>
  
  <pre><code>#include &lt;QLabel&gt;
  #include &lt;QLineEdit&gt;
  #include &lt;QPushButton&gt;
  #include &lt;QHBoxLayout&gt;
  
  #include "dialog.h"
  
  Dialog::Dialog(QWidget *parent) : QDialog(parent)
  {
      label = new QLabel("Ne label");
      LineEdit = new QLineEdit();
      button = new QPushButton("Push me");
  
      QHBoxLayout *layout = new QHBoxLayout();
      layout-&gt;addWidget(label);
      layout-&gt;addWidget(LineEdit);
      layout-&gt;addWidget(button);
      setLayout(layout);
      setWindowTitle("Dialog name");
  
      connect(button, SIGNAL(clicked()), this, SLOT(on()));
  }
  
  void Dialog::on()
  {
      label-&gt;setStyleSheet("QLabel { background-color : black; color : white; }");
  }
  
  void Dialog::status(const QString &amp;str)
  {
  
  }
  </code></pre>
  
  <p>project file looks fine:</p>
  
  <pre><code>QT += gui declarative
  SOURCES += \
  main.cpp \
  dialog.cpp
  HEADERS += \
  dialog.h
  </code></pre>
  
  <p>Thanks for your help. </p>