How to create a modular structure of the project, as shown:
So that in the src folder there were modules consisting of .pri files, headers of .h files, ui and .cpp files. Now everything is in the heap:
What is there to choose? :
For QtCreator 4.5:
Create> Other project> Project with subdirectories
A project will be created where you can add subprojects. It will be possible to specify the relationship between them, from which the compilation order is automatically calculated.
However, I recommend manually writing pro-files.
TEMPLATE = subdirs #Π’ΠΈΠΏ ΠΏΡΠΎΠ΅ΠΊΡΠ° CONFIG += ordered #Π‘ΠΎΠ±ΠΈΡΠ°Π΅ΠΌ ΠΏΠΎ ΠΏΠΎΡΡΠ΄ΠΊΡ, ΠΊΠ°ΠΊ ΡΠΊΠ°Π·Π°Π½ΠΎ SUBDIRS += \ osm_elements \ tests \ osm_widget tests.depends = osm_widget #Π’Π°ΠΊ ΠΎΠ±ΠΎΠ·Π½Π°ΡΠ°Π΅ΡΡΡ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΡ osm_widget.depends = osm_elements TEMPLATE indicates the type of project. In this case, the project with subdirectories.
TEMPLATE=app #ΠΡΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ TEMPLATE=lib #ΠΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ° TEMPLATE=subdirs #ΠΡΠΎΠ΅ΠΊΡ Ρ ΠΏΠΎΠ΄ΠΏΡΠΎΠ΅ΠΊΡΠ°ΠΌΠΈ Check the QtCreator help, qmake, Getting Started section.
Source: https://ru.stackoverflow.com/questions/782391/
All Articles
profile, the following modules are connected viainclude:include( Manager/Manager.pri )- gil9red