[Solved] QtCreator: How to generate a Qt .pro files that open other project?
-
wrote on 31 Oct 2012, 06:07 last edited by
Hi alls!
This is just my little curious. Thing is everytimes I open my project trees, I would need to browse into each of my project files's locations.
I know there must be a way so that when I open one .pro files, QtCreator will open all my other .pro files for me. But I just don't know where to look.
If you could give me a code example or some wiki link related, it will be highly appreciated!
Thanks!
-
wrote on 31 Oct 2012, 07:50 last edited by
Go to File > Session Manager... and create a session for your project.
You can then use File > Session to switch between various sessions. QtCreator will automatically open all previously opened projects and files.
Make sure you've ticked File > Session Manager... > Restore last session on startup to open the last session automatically (where you've 'left' your work) once QtCreator starts.
-
wrote on 1 Nov 2012, 05:32 last edited by
So the only way to make this happen is to use Session setting?
Since I change dev environment often to test my work, so whenever I install creator, I will need to set another session for that one...
-
wrote on 1 Nov 2012, 12:38 last edited by
You could group your project into a SUBDIRS project, or you could look into using the include() statement in your .pro file.
-
wrote on 2 Nov 2012, 04:45 last edited by
I tried include() in a test.pro file like this:
@
include ("path/to/1.pro")
include ("path/to/2.pro")
@But when I opened it, QtCreator only open path to that project in a tree, but not actually open the other project.
Tried SUBDIRS, but QtCreator only open and show the test.pro..
Could you give me some simple example?
Much appreciated!
-
wrote on 2 Nov 2012, 08:00 last edited by
They won't be opened as separate projects, no. They will be opened as sub projects in the first case, and as included files in the second. For really opening them as separate projects, you'll really have to resort to using sessions.
-
wrote on 2 Nov 2012, 09:58 last edited by
Thanks everyone, guess I will have to stick with sessions.
Case solved!
1/7