Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [Solved] QtCreator: How to generate a Qt .pro files that open other project?

[Solved] QtCreator: How to generate a Qt .pro files that open other project?

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 3 Posters 4.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scroverty
    wrote on last edited by
    #1

    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!

    Alvis Ar'Berkeley Andrew.
    Pleased to meet you!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        scroverty
        wrote on last edited by
        #3

        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...

        Alvis Ar'Berkeley Andrew.
        Pleased to meet you!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          You could group your project into a SUBDIRS project, or you could look into using the include() statement in your .pro file.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            scroverty
            wrote on last edited by
            #5

            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!

            Alvis Ar'Berkeley Andrew.
            Pleased to meet you!

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                scroverty
                wrote on last edited by
                #7

                Thanks everyone, guess I will have to stick with sessions.

                Case solved!

                Alvis Ar'Berkeley Andrew.
                Pleased to meet you!

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved