I have an project opened in Qt creator and I'd like to add new window to it.
I choose File->New->Qt Designer Form Class->Widget and I even don't change anything, but when I try to compile I've got such an error:
/home/mac/C++/scan/window2.cpp:6: error: invalid use of incomplete type 'struct Ui::Window2'
To solve this problem it's needed to manualy open ui_window2.h file, and replace this fragment:
namespace Ui {
class Form: public Ui_Form {};
} // namespace Ui
namespace Ui {
class Form: public Ui_Form {};
} // namespace Ui
To copy to clipboard, switch view to plain text mode
by this:
namespace Ui {
class Window2: public Ui_Form {};
} // namespace Ui
namespace Ui {
class Window2: public Ui_Form {};
} // namespace Ui
To copy to clipboard, switch view to plain text mode
After that generally everything works fine, but everytime I change anything on my form in designer, Creator generates this wrong fragment and I cannot to compile the code.
Is it an error (I'm using candidate release), or I'm doing something wrong?
Bookmarks