Hi there, folks!!

I have a bit of a problem here with being able to declare an object from a class derived from a UI file designed with Qt Designer, in other words:

in adddialog.h,

Qt Code:
  1. #ifndef ADDDIALOG_H
  2. #define ADDDIALOG_H
  3. #include "ui_adddialog.h"
  4.  
  5. class adddialog : public QDialog, private Ui::AddDLG {
  6. Q_OBJECT
  7. public:
  8. adddialog ();
  9. };
  10. #endif // ADDDIALOG_H
To copy to clipboard, switch view to plain text mode 

in adddialog.cpp,

Qt Code:
  1. #include "adddialog.h"
  2.  
  3. adddialog::adddialog() {
  4. setupUi(this);
  5. }
To copy to clipboard, switch view to plain text mode 

and in the implementation of the main window,

Qt Code:
  1. #include "adddialog.h"
  2. ...
  3. void mainwindow::adddialog() {
  4. adddialog add;
  5. add.show();
  6. }
To copy to clipboard, switch view to plain text mode 

void adddialog in the class mainwindow is a slot, later used to connect a button to it, and hence make an "Add Dialog" launch whenever the button is clicked.
When I run this code I get the following errors:

"expected ; before 'add' "
"statement cannot resolve address of overloaded function"
" 'add' was not declared in this scope"

What am I doing wrong??? As usual sample code would be very appreaciated.

Thanks in advance