How can I set up my project hierarchy in QtCreator?
The documentation of Qt Creator contains two sections that may help you find the answers to your questions:
EDIT: You can find a really simple sample project here: QtSymbianDllExample. "It is intended to demonstrate how to create and use a DLL with Qt on the Symbian platform". It is a sample for Symbian development but that is irrelevant now, I do not have a Symbian phone. What is important is that it contains a root project (QtSymbianDllExample\qtssymbiandllexample.pro) and two subprojects (QtSymbianDllExample\qtenginedll\qtenginedll.pro, QtSymbianDllExample\testui_simpledllengine\testui_simpledllengine.pro) which you can examine and compare to you projects. I have checked that I can build the root project by doing the following steps:
- Download and install the Windows Offline Installer from http://www.qt.io/download/
- Download and extract QtSymbianDllExample.zip
- Run Qt Creator
- File / Open File or Project... Select qtssymbiandllexample.pro
- Build / Run qmake
- Build / Build project "qtsymbiandllexample"
Joey Carson
StackOverflow has allowed me to find the real answers to burning technical questions that keep me up at night. This community has been a truly integral supplement to my education and my career. #SOreadytohelp I'm a software engineer at Microsoft working in computer vision space.
Updated on June 12, 2022Comments
-
Joey Carson about 2 years
I'm quite new to QtCreator, so perhaps I left my heart in eclipse-ville, but I can't for the life of me understand how I should be setting up a project hierarchy in QtCreator. I understand there is an option to create a kind of root project and then from there add sub-projects to it, which makes sense but it leaves me wondering whether or not this is necessary at the time of creating the project, e.g. can I just create a library in one project and reference it later by another project?
I've tried setting up a blanket type of project by creating a new subdirs project and then adding the main program as a subproject, but then how should I add my library project?
Ideally, I'd like to create one project as the main application and reference another project as a library. Help?