Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
incomplete type is not allowed
this my .h file:
using namespace Qt;
class AddressDialog : public QDialog
Ui::AddressDialog *ui = nullptr;
explicit AddressDialog(QWidget *parent = nullptr);
QString remoteName() const;
quint16 remotePort() const;
and this is .cpp file:
: QDialog(parent), ui(new Ui:: AddressDialog) //error
I use Qt in VS 2017. in ui(new Ui:: AddressDialog), I have the "incomplete type is not allowed". why?
C++ basics - you have to (forward) declare a type before you can use it. So either include the generated ui file in your header or forward declare it there.
I know this my friend. this is a example of Qt website
@Aminmlp Compiles for me.
I guess you see it not when building instead it comes from code model?
what do you mean?
@Aminmlp When do you see this error?
Is it when you build the project?
@jsulm yes you are right.
@Aminmlp how do you build it ?