Hi,

I set up Qt for Netbeans yesterday following this tutorial : https://netbeans.org/kb/docs/cnd/qt-applications.html
But I have a problem with the Qt Library.

I create a HelloForm class (example) but I have compilation problems, just making a call of an instance of HelloForm :

Qt Code:
  1. #include <QtGui/QApplication>
  2. #include <QtGui>
  3.  
  4. #include "HelloForm.h"
  5.  
  6. int main(int argc, char *argv[]) {
  7.  
  8. QApplication app(argc, argv);
  9.  
  10. HelloForm form();
  11. // form.show();
  12.  
  13. return app.exec();
  14. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #ifndef _HELLOFORM_H
  2. #define _HELLOFORM_H
  3.  
  4. #include "ui_HelloForm.h"
  5.  
  6. class HelloForm : public QWidget {
  7. Q_OBJECT
  8. public:
  9. HelloForm();
  10. virtual ~HelloForm();
  11. private:
  12. Ui::HelloForm widget;
  13. };
  14.  
  15. #endif /* _HELLOFORM_H */
To copy to clipboard, switch view to plain text mode 

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

Erros are :

Qt Code:
  1. HelloForm.cpp: In constructor 'HelloForm::HelloForm()':
  2. HelloForm.cpp:11:24: erreur: no matching function for call to 'Ui::HelloForm::setupUi(HelloForm* const)'
  3. HelloForm.cpp:11:24: note: candidate is:
  4. In file included from HelloForm.h:11:0,
  5. from HelloForm.cpp:8:
  6. ui_HelloForm.h:28:10: note: void Ui_HelloForm::setupUi(QDialog*)
  7. ui_HelloForm.h:28:10: note: no known conversion for argument 1 from 'HelloForm* const' to 'QDialog*'
To copy to clipboard, switch view to plain text mode 

I checked the Qt parameters and everthing seems to be ok... Any idea ?
I am using Qt 4.8.x and Netbeans 7.2

Thanks