My goal here is to create a signal "expandParentItem" in my QFileSystemModel subclass so that when a parent item is checked in the associated QtreeView, the QtreeView can automatically expand it to show its children.
I define and I emit the signal like this:

FileSysSelectModel.h
Qt Code:
  1. #ifndef FILESYSSELECTMODEL_H
  2. #define FILESYSSELECTMODEL_H
  3.  
  4. #include<QFileSystemModel>
  5. #include <QSet>
  6. #include <QPersistentModelIndex>
  7. #include <QVariant>
  8.  
  9. class FileSysSelectModel: public QFileSystemModel
  10. {
  11. private:
  12. QSet<QPersistentModelIndex> m_checkTable;
  13. QVariant m_noData;
  14.  
  15. void FileSysSelectModel::updateSubMembers(const QModelIndex &index, const QVariant &value);
  16.  
  17. public:
  18. int FileSysSelectModel::columnCount(const QModelIndex &parent) const;
  19. QVariant FileSysSelectModel::data(const QModelIndex &index, int role) const;
  20. virtual Qt::ItemFlags FileSysSelectModel::flags(const QModelIndex &index) const;
  21. virtual bool FileSysSelectModel::setData(const QModelIndex &index, const QVariant &value, int role);
  22.  
  23. signals:
  24. void expandParentItem(const QModelIndex &index);
  25. };
  26.  
  27. #endif // FILESYSSELECTMODEL_H
To copy to clipboard, switch view to plain text mode 
Function managing the signal in FileSysSelectModel.cpp
Qt Code:
  1. //if the current item has children:
  2. // check all the child items if the parent item is checked.
  3. // uncheck all the child items if the parent item is unchecked.
  4. void FileSysSelectModel::updateSubMembers(const QModelIndex &index, const QVariant &value)
  5. {
  6. QModelIndex firstChild = index.child(0,0);
  7. QModelIndex currentChild;
  8. if (firstChild.isValid())
  9. {
  10. if(value == Qt::Checked) emit expandParentItem(index);
  11.  
  12. int i = 0;
  13. while(1)
  14. {
  15. currentChild = index.child(i,0);
  16. //Recursive call
  17. FileSysSelectModel::updateSubMembers(currentChild, value);
  18. if (!currentChild.isValid()) break;
  19. if(value == Qt::Checked) m_checkTable.insert(currentChild); else m_checkTable.remove(currentChild);
  20. i = i+1;
  21. }
  22. emit dataChanged(firstChild, currentChild);
  23. }
  24. }
To copy to clipboard, switch view to plain text mode 
I connect the signal to the QtreeView in my main window like this:

mainwindow.cpp
Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. MainWindow::MainWindow(QWidget *parent) :
  5. QMainWindow(parent),
  6. ui(new Ui::MainWindow)
  7. {
  8. ui->setupUi(this);
  9.  
  10. m_fileSystemModel = new FileSysSelectModel;
  11. m_fileSystemModel->setRootPath(QDir::currentPath());
  12. ui->scriptFileView->setModel(m_fileSystemModel);
  13.  
  14. QObject::connect(m_fileSystemModel,SIGNAL(expandParentItem(QModelIndex)),ui->scriptFileView,SLOT(expand(QModelIndex)));
  15. }
  16.  
  17. MainWindow::~MainWindow()
  18. {
  19. delete ui;
  20. }
To copy to clipboard, switch view to plain text mode 

When I try to compile, I get the following error message:

FileSysSelectModel.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall FileSysSelectModel::expandParentItem(class QModelIndex const &)" (?expandParentItem@FileSysSelectModel@@QAEXABVQMod elIndex@@@Z) referenced in function "private: void __thiscall FileSysSelectModel::updateSubMembers(class QModelIndex const &,class QVariant const &)" (?updateSubMembers@FileSysSelectModel@@AAEXABVQMod elIndex@@ABVQVariant@@@Z)

debug\Designer_test.exe:-1: error: LNK1120: 1 unresolved externals

I'm new to Qt and I'm having a hard time understanding this error message.
Could someone help me with this issue?