Hello everybody,
i am a newbie in using the MVC-Classes of QT4. (4.3.4) I have got the following problem:

I provide an implementation of QAbstactItemModel named MyModel. This Model works fine.

Qt Code:
  1. class MyModel : public QAbstractItemModel
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. MyModel( const QString &filename, QObject* parent = 0 );
  7. ~MyModel();
  8.  
  9. /*
  10.   ** AbstractItemModel(required methods)
  11.   */
  12. QVariant data(const QModelIndex &index, int role = Qt::DisplayRole ) const;
  13. QModelIndex index(int row, int col, const QModelIndex &parent = QModelIndex() ) const;
  14. QModelIndex parent(const QModelIndex &index ) const;
  15. int rowCount(const QModelIndex &parent = QModelIndex() ) const;
  16. int columnCount(const QModelIndex &parent = QModelIndex() ) const;
  17. QVariant headerData(int section, Qt::Orientation orientation,
  18. int role = Qt::DisplayRole) const;
  19.  
  20. Qt::ItemFlags flags(const QModelIndex &index) const;
  21. bool setData(const QModelIndex &index, const QVariant &value,
  22. int role = Qt::EditRole);
  23. private:
  24. void setupModel();
  25. .
  26. .
  27. .
  28. };
To copy to clipboard, switch view to plain text mode 

Now I want to subclass from this bassclass to create a new model called MyTXTModel.

Qt Code:
  1. class MyTXTModel : MyModel
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. MyTXTModel(const QString& filename, QObject *parent = 0);
  7. ~MyTXTModel();
  8.  
  9. private:
  10. .
  11. .
  12. .
  13. };
To copy to clipboard, switch view to plain text mode 

But this model doesn't work. I get several errors from the linker:

Qt Code:
  1. MyTXTModel.obj : error LNK2019: link to unresolved external symbol ""public: __thiscall MyModel::MyModel(class QString const &,class QObject *)" (??0MyModel@@QAE@ABVQString@@PAVQObject@@@Z)" in function ""public: __thiscall MyTXTModel::MyTXTModel(class QString const &,class QObject *)" (??0MyTXTModel@@QAE@ABVQString@@PAVQObject@@@Z)".
  2. MyTXTModel.obj : error LNK2001: unresolved external symbol ""public: virtual class QModelIndex __thiscall MyModel::index(int,int,class QModelIndex const &)const " (?index@MyModel@@UBE?AVQModelIndex@@HHABV2@@Z)".
  3. .
  4. .
  5. .
To copy to clipboard, switch view to plain text mode 

Does anybody have a solution for this problem???

Kind regards