Stuck in this Error :::invalid use of incomplete type ‘class Ui::Dialog’ ui(new Ui::Dialog) ^~~~~~
-
So how did you name you widget in the designer? Looking into ui_dialog.h will show you that it's at least not 'Dialog'
@Christian-Ehrlicher in designer i have used only Dialog , then why its shows the error , please give some suggestion to fix this error
-
@sankarapandiyan nobody will be able to find the error here, show us your header file
also pls use the code tag to display code:
@J-Hilk YEs i have done it .please give me some suggestion about the error
-
@J-Hilk YEs i have done it .please give me some suggestion about the error
@sankarapandiyan He asked you to post the code...
-
@sankarapandiyan He asked you to post the code...
@jsulm sure check it
-
@sankarapandiyan nobody will be able to find the error here, show us your header file
also pls use the code tag to display code:
@J-Hilk I have done it
-
@J-Hilk I have done it
@sankarapandiyan said in Stuck in this Error :::invalid use of incomplete type ‘class Ui::Dialog’ ui(new Ui::Dialog) ^~~~~~:
I have done it
Where? I can't see the code from your header files anywhere...
-
@sankarapandiyan said in Stuck in this Error :::invalid use of incomplete type ‘class Ui::Dialog’ ui(new Ui::Dialog) ^~~~~~:
I have done it
Where? I can't see the code from your header files anywhere...
@jsulm i have done
-
@jsulm i have done
@sankarapandiyan Sorry, but I can't see it anywhere...
-
@jsulm i have done
@sankarapandiyan neither can I
-
Hi
Please also showdialog.h
and most important
ui_dialog.h
-
``
i have included #include <ui_dialog.h> in dialog.h #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include "mytask.h" #include <ui_dialog.h> namespace Ui { class Dialog; } but the error remains the same /home/adx-soft1/Desktop/Sankarapandiyan/ProgDial/dialog.cpp:10: error: invalid use of incomplete type ‘class Ui::Dialog’ ui(new Ui::Dialog) ^~~~~~ this is my dialog.h #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include "mytask.h" #include <ui_dialog.h> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = 0); ~Dialog(); private slots: void on_modalButton_clicked(); void on_modelessButton_clicked(); private: Ui::Dialog *ui; MyTask *myTask; }; #endif // DIALOG_H
-
``
i have included #include <ui_dialog.h> in dialog.h #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include "mytask.h" #include <ui_dialog.h> namespace Ui { class Dialog; } but the error remains the same /home/adx-soft1/Desktop/Sankarapandiyan/ProgDial/dialog.cpp:10: error: invalid use of incomplete type ‘class Ui::Dialog’ ui(new Ui::Dialog) ^~~~~~ this is my dialog.h #ifndef DIALOG_H #define DIALOG_H #include <QDialog> #include "mytask.h" #include <ui_dialog.h> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = 0); ~Dialog(); private slots: void on_modalButton_clicked(); void on_modelessButton_clicked(); private: Ui::Dialog *ui; MyTask *myTask; }; #endif // DIALOG_H
@sankarapandiyan Can you please simply provide the content of ui_dialog.h? This is what we are asking all the time.
-
@sankarapandiyan Can you please simply provide the content of ui_dialog.h? This is what we are asking all the time.
@jsulm [url=https://postimg.cc/tZyZdZ4R][img]https://i.postimg.cc/tZyZdZ4R/Screenshot-from-2019-10-31-13-33-16.png[/img][/url]
[url=https://postimg.cc/rd5RtCcY][img]https://i.postimg.cc/rd5RtCcY/Screenshot-from-2019-10-31-13-33-28.png[/img][/url]
-
@jsulm [url=https://postimg.cc/tZyZdZ4R][img]https://i.postimg.cc/tZyZdZ4R/Screenshot-from-2019-10-31-13-33-16.png[/img][/url]
[url=https://postimg.cc/rd5RtCcY][img]https://i.postimg.cc/rd5RtCcY/Screenshot-from-2019-10-31-13-33-28.png[/img][/url]
@sankarapandiyan This is not what we asked you to provide!
AGAIN: post the content of ui_dialog.h ! It is a normal C++ header file, so symply copy its text and post it here directly... -
@sankarapandiyan This is not what we asked you to provide!
AGAIN: post the content of ui_dialog.h ! It is a normal C++ header file, so symply copy its text and post it here directly...@jsulm ```
code_text#define DIALOG_H #include <QDialog> #include<QTimer> #include<QProgressDialog> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = nullptr); ~Dialog(); public slots: void myfunction(); void perform(); void cancel(); private: Ui::Dialog *ui; int steps; QProgressDialog*pd; QTimer*timer; }; #endif // DIALOG_H This is the hedder file of dialog.h
-
@jsulm ```
code_text#define DIALOG_H #include <QDialog> #include<QTimer> #include<QProgressDialog> namespace Ui { class Dialog; } class Dialog : public QDialog { Q_OBJECT public: explicit Dialog(QWidget *parent = nullptr); ~Dialog(); public slots: void myfunction(); void perform(); void cancel(); private: Ui::Dialog *ui; int steps; QProgressDialog*pd; QTimer*timer; }; #endif // DIALOG_H This is the hedder file of dialog.h
@sankarapandiyan Sorry I will stop here as I'm tired to explain that you simply need to copy text from ui_dialog.h and paste it here...
-
@sankarapandiyan Sorry I will stop here as I'm tired to explain that you simply need to copy text from ui_dialog.h and paste it here...
@jsulm i didnt have a content of ui dialog . h , And i am having dialog.h file only is there thats why i have uploaded repeatedly
-
@jsulm i didnt have a content of ui dialog . h , And i am having dialog.h file only is there thats why i have uploaded repeatedly
@sankarapandiyan
it will not be inside QtCreator as it is a automatically created file.But you will find in in your build directory, if you use a normal file explorer, the one that comes with your operating system
-
@sankarapandiyan
it will not be inside QtCreator as it is a automatically created file.But you will find in in your build directory, if you use a normal file explorer, the one that comes with your operating system
This post is deleted! -
This post is deleted!
@sankarapandiyan
Nope thats the actual UI file
its
ui_dialog.h
we are after to see if its broken somehow.
Its auto generated file and lives in the build folder
not in project folder.