Merging plugins and main program projects
It is a tedious thing that opens several projects and builds them in order. This is not a big deal given that we have just two plugins and a main program. However, it'll become a serious inefficiency issue once the number of plugins increase. Therefore, it is a better practice to merge the plugins into the main project and get them built in a specified order every time we click on the Build button. It's totally feasible and is commonly seen in Qt projects.
Firstly, we move all the files in the painter_demo
directory, except for the EllipsePlugin
and TextPlugin
folders, into a newly created main
folder.
Then, rename the painter_demo.pro
to main.pro
in the main
folder while creating a new painter_demo.pro
project file outside in the painter_demo
directory. This new painter_demo.pro
project file needs to have contents as shown in the following code:
TEMPLATE = subdirs CONFIG += ordered SUBDIRS = TextPlugin \ EllipsePlugin \ ...