Unsolved .ui form conversion into C++ header file by UIC
-
CHALLENGE (problem):
#include "ui_Central.h"Issues: ui_Central.h: No such file or directory
I am following a tutorial for my first Qt application:
http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.htmlI used the code exactly as it is BUT I renamed
myqtapp
to
Central
in every occurrence.After about 40 hours straight and downloading many of the various selections from Qt website, I finally discovered that the downloads are based on the compiler to be used. The current download version I am using is qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe
Please, what do I need to do to correct this error?
Any and all suggestions greatly appreciated.
-
@TahorSuiJurisBenYAH
Hello,
Could you please provide your .pro file?Kind regards.
-
wow, thank you shall do. I just re did the entire tutorial in the original as provided.
how do I attach the files or code? -
@TahorSuiJurisBenYAH
Just paste your .pro file as a post here between tree backticks: ```. This will generate a code block and everything should be clearly visible. -
Thank you! for your kindness.
it is the same as in the tuturial url
http://sector.ynet.sk/qt4-tutorial/my-first-qt-gui-application.htmlHEADERS = Central.h SOURCES = Central.cpp main.cpp FORMS = Central.ui # install target.path = Central sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro sources.path = . INSTALLS += target sources
-
@TahorSuiJurisBenYAH
Hello,
Is this your whole project file, it seems a bit strange. For example a pro file from a project of mine looks like this:QT += core gui widgets CONFIG += link_prl TARGET = ageditor TEMPLATE = app win32 { DESTDIR = $$OUT_PWD //< This is because I'm using shadow builds } SOURCES += \ ageditormain.cpp \ ageditorwindow.cpp HEADERS += \ ageditorwindow.h FORMS += \ ageditorwindow.ui
You don't seem to have put your full Qt configuration. Could you add these lines:
QT += core gui widgets TARGET = Central TEMPLATE = app
Rerun qmake and see what you get.
Also this part:
target.path = Central sources.files = $SOURCES $HEADERS $RESOURCES $FORMS *.pro sources.path = . INSTALLS += target sources
I don't really understand.
As a side note, what IDE are you using for development?
Kind regards.
-
This is the IDE:
Filename: qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exe
Description: Qt Enterprise offline installer for Windows host operating system. The package provides everything you need to start Qt development:
-
@TahorSuiJurisBenYAH
Hello,This is the IDE:
Filename: qt-enterprise-windows-x86-mingw-w64-492-5.5.1.exeWell this is an SDK package that contains the MinGW 65 bit compiler, Qt 5.5.1 and (probably) QtCreator. However you're not bound in any way to the QtCreator IDE, that's why I'm asking. You could be using some other tool to build your projects. In any case, I'd assume you're using the QtCreator, but that notwithstanding, you should still at least add the
QT +=
configuration in your project.Kind regards.
-
ok how do I do that please
-
@TahorSuiJurisBenYAH
You just edit your .pro file (double-clicking on it in the project view) and edit it manually. Look inhere I think it'll help you set your project up.Kind regards.
-
The whole thing is in Qt Creator. That is not the problem, the problem is why ui_Central.h is not being created.
-
@TahorSuiJurisBenYAH
Hello,
It should be, provided your form is calledCentral.ui
and you have the lineFORMS += Central.ui
in your project file theuic
is supposed to createui_Central.h
for you whenqmake
runs. Maybe there's some problem with the path. Could you check whether theui_Central.h
is created or not in your build folder?Kind regards.