У меня есть поток, который сканирует файл на изменения, а есть диалог, который должен отрисовывать информацию. Нужен способ, чтобы поток мог указать диалогу, что требуется отобразить какую-то информацию. Пробовал через сигналы.
//watchthread.h
class WatchThread : public QThread
{
     Q_OBJECT
public:
    WatchThread();
    void run();
    void get_event (int fd, const char * target);
signals:
     void writeInfo(char *info);
};
//watchthread.cpp
void WatchThread::run()
{
   emit writeInfo("Hello!!!");
}
//dialog.h
class Dialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit Dialog(QWidget *parent = 0 );
    ~Dialog();
    void watch_File();
    char *get_WatchFile();
    void get_event (int fd, const char * target);
    void handle_error (int error);
   
private slots:
    void on_btnBrowse_clicked();
    void on_pushButton_clicked();
public slots:
    void write_WatchInfo(char *info);
private:
    Ui::Dialog *ui;
};
//dialog.cpp
void Dialog::write_WatchInfo(char *info)
{
ui->listWidget->insertItem(0, QString(info));
}
//main
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Dialog w;
    WatchThread thread;
    QObject::connect(&thread, SIGNAL(writeInfo(char *)),
                          &w, SLOT(write_WatchInfo(char *)));
    w.show();
    thread.start();
  
    return a.exec();
}
Выдает:
main.o: In function `main':
main.cpp:(.text.startup+0x84): undefined reference to `vtable for WatchThread'
main.cpp:(.text.startup+0xcb): undefined reference to `vtable for WatchThread'
watchthread.o: In function `WatchThread::WatchThread()':
watchthread.cpp:(.text+0xe): undefined reference to `vtable for WatchThread'
collect2: error: ld returned 1 exit status
Не могу понять, что я делаю не так, т.к. Пример брал отсюда 
http://www.doc.crossplatform.ru/qt/4.7.x/signalsandslots.htmlПодскажите пожалуйста, что я не так делаю?