title: How to write the qmake file for a test case?
body: <p>I just don't understand what is the overall layout of a Qt project with a program and a test...</p>
  
  <p>The project of QTest tutorial only have the test program, but my project already have another program. If I add the test case, it claims "multiple definition of main()", as <em>QTEST_MAIN</em> is actually another <em>main()</em>.</p>
  
  <p>In addition, I got "undefined reference to vtable" on my test class, and don't know why..</p>
  
  <p>I'm using Qt 5.2.1</p>
  
  <p>This is my project file:</p>
  
  <pre><code>#-------------------------------------------------
  #
  # Project created by QtCreator 2014-06-06T13:42:19
  #
  #-------------------------------------------------
  
  QT       += core gui testlib
  CONFIG += testcase
  
  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  
  TARGET = GutMiner
  TEMPLATE = app
  LIBS += -lquazip
  
  
  SOURCES += main.cpp\
          mainwindow.cpp \
      dataform.cpp \
      datavec.cpp \
      distance.cpp \
      linereader.cpp \
      diseasepackage.cpp \
      error.cpp \
      newpagedialog.cpp \
      resultpage.cpp \
      test.cpp
  
  HEADERS  += mainwindow.h \
      dataform.h \
      distance.h \
      datavec.h \
      linereader.h \
      diseasepackage.h \
      error.h \
      newpagedialog.h \
      resultpage.h
  
  FORMS    += mainwindow.ui \
      dataform.ui \
      newpagedialog.ui
  </code></pre>
  
  <p>and this is my test source file:</p>
  
  <pre><code>#include &lt;QObject&gt;
  #include &lt;QTest&gt;
  
  #include "distance.h"
  #include "diseasepackage.h"
  
  class TestDistance: public QObject
  {
      Q_OBJECT
  public:
      virtual ~TestDistance();
  private slots:
      void jensen_shannon();
  };
  
  TestDistance::~TestDistance() {}
  
  void TestDistance::jensen_shannon()
  {
      DiseasePackage pkg("CRC.zip");
  }
  
  QTEST_MAIN(TestDistance);
  </code></pre>