I was wondering how to use a QT Project into another in QTCreator. I've created a subdirs test project with this hierarchy :
MainProject
MainProject.pro
ConsoleSubProject
ConsoleSubProject.pro
main.cpp
firstclass.hpp
firstclass.cpp
GuiSubProject
GuiSubProject.pro
main.cpp
mainwindow.hpp
mainwindow.cpp
I would like to use the class "firstclass" (ConsoleSubProject) in GuiSubProject. To do so, I've added this line in GuiSubProject.pro :
include(../ConsoleSubProject/ConsoleSubProject.pro)
When I've tried to build the project, it give me errors :
MainProject/GuiSubProject/mainwindow.hpp:4: error: QMainWindow: No such file or directory
If you have any idea about how can I use the class of project into another ?
Regards
mainwindow.hpp
? - KirweenQT += gui
inGuiSubProject.pro
for Qt include path ? - KirweenConsoleSubProject.pro
if you haveQT -= gui
take care where is yourinclude(../ConsoleSubProject/ConsoleSubProject.pro)
inGuiSubProject.pro
- Kirween