I got this compilation error.

When I try to debug, I got these errors.

Error.jpg

main.obj:-1: error: LNK2019: unresolved external symbol "public: void __thiscall Keyboard::setWidget(class QWidget *)" (?setWidget@Keyboard@@QAEXPAVQWidget@@@Z) referenced in function _main

main.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall Keyboard::Keyboard(class QObject *)" (??0Keyboard@@QAE@PAVQObject@@@Z) referenced in function _main

And the source come from this code.

Qt Code:
  1. Keyboard::Keyboard(QObject *parent) : QObject(parent)
  2. {
  3. theWidget = NULL;
  4. }
  5.  
  6. void Keyboard::setWidget(QWidget* theWidget)
  7. {
  8. this->theWidget = theWidget;
  9. }
To copy to clipboard, switch view to plain text mode 


I hope someone can tell me whether I got missing any things
or I need to change some things in the Build Setting.
Thank you