Installation problem
-
Hello I'm new to Qt . I just intall Q6. When I'm trying to start a new qt widget project I'm getting errors in mainwindow.cpp
1-( for "ui(new Ui::MainWindow)... " allocation of incomplete type 'UI::MainWindow'"
2-( For ui->setupUi(this)) ..."Member access into incomplete type 'UI::MainWindow'"
3- ("delete ui") delete pointer to incomplete type 'Ui::MainWindow' may cause undefined behavior
Can someone help ?
Thanks -
Hello I'm new to Qt . I just intall Q6. When I'm trying to start a new qt widget project I'm getting errors in mainwindow.cpp
1-( for "ui(new Ui::MainWindow)... " allocation of incomplete type 'UI::MainWindow'"
2-( For ui->setupUi(this)) ..."Member access into incomplete type 'UI::MainWindow'"
3- ("delete ui") delete pointer to incomplete type 'Ui::MainWindow' may cause undefined behavior
Can someone help ?
Thanks -
-
There is already: #include "./ui_mainwindow" but I get the error that this file doesn't exist which is true, I checked in the directory
and the line you told me to add produce the same error . This file is simply not created by Qt and doesn't exist ??? -
Sorry @JonB , it seems that there is a delay between what I type and what appear. So To answer your first question you ask me :
1- Is this line in your mainwindow.cpp. The answer is yes
2- you said : Either that include line is absent, or the ui_mainwindow.h is empty/needs regenerating from a complete rebuild.I answered: a) There is already the line "./ui_mainwindow" b) I added the line "ui_mainwindow.h" but the problem is that no such file exist
Thanks for your help -
Sorry @JonB , it seems that there is a delay between what I type and what appear. So To answer your first question you ask me :
1- Is this line in your mainwindow.cpp. The answer is yes
2- you said : Either that include line is absent, or the ui_mainwindow.h is empty/needs regenerating from a complete rebuild.I answered: a) There is already the line "./ui_mainwindow" b) I added the line "ui_mainwindow.h" but the problem is that no such file exist
Thanks for your help