Problem with Qt Netbeans, method calls
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 :
Code:
#include <QtGui/QApplication>
#include <QtGui>
#include "HelloForm.h"
int main(int argc, char *argv[]) {
HelloForm form();
// form.show();
return app.exec();
}
Code:
#ifndef _HELLOFORM_H
#define _HELLOFORM_H
#include "ui_HelloForm.h"
Q_OBJECT
public:
HelloForm();
virtual ~HelloForm();
private:
Ui::HelloForm widget;
};
#endif /* _HELLOFORM_H */
Code:
#include "HelloForm.h"
HelloForm::HelloForm() {
widget.setupUi(this);
}
HelloForm::~HelloForm() {
}
Erros are :
Code:
HelloForm.cpp: In constructor 'HelloForm::HelloForm()':
HelloForm.cpp:11:24: erreur: no matching function for call to 'Ui::HelloForm::setupUi(HelloForm* const)'
HelloForm.cpp:11:24: note: candidate is:
In file included from HelloForm.h:11:0,
from HelloForm.cpp:8:
ui_HelloForm.
h:28:10: note
: void Ui_HelloForm
::setupUi(QDialog*)ui_HelloForm.h:28:10: note: no known conversion for argument 1 from 'HelloForm* const' to 'QDialog*'
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
Re: Problem with Qt Netbeans, method calls
did u try clean and make again?
Hope it helps,
Bala
Re: Problem with Qt Netbeans, method calls
I did.
Could it be a version problem ?