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. Hiding implementation in cpp files
Forum Updated to NodeBB v4.3 + New Features

Hiding implementation in cpp files

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
15 Posts 3 Posters 1.3k Views 1 Watching
  • 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.
  • J jkwok678

    I was wondering if it would be possible to hide implementation of some methods permanently or just for the program to remember that I want to hide it every time I use Qt creator , as the method is 100 % done.

    JonBJ Offline
    JonBJ Offline
    JonB
    wrote on last edited by
    #2

    @jkwok678
    All you have is Edit > Advanced > Toggle Fold All, and Creator seems to pretty limited about saving how you last viewed... :(

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #3

      Hi
      Make sure you have this on.
      alt text

      Then mine remembers what i folded.

      JonBJ 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi
        Make sure you have this on.
        alt text

        Then mine remembers what i folded.

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #4

        @mrjj
        It does, but only for the last session. So once you read in some other project for whatever reason, you lose the folding remembered on the first project, right? That's what I meant by "limited". And in fact I do not have Restore last session on startup checked, but it does restore folding if I click the Open last session, so I think it's just a "last session" thing regardless of when/how you restore.

        Or do you find a way to remember previous sessions too?

        mrjjM 1 Reply Last reply
        0
        • JonBJ JonB

          @mrjj
          It does, but only for the last session. So once you read in some other project for whatever reason, you lose the folding remembered on the first project, right? That's what I meant by "limited". And in fact I do not have Restore last session on startup checked, but it does restore folding if I click the Open last session, so I think it's just a "last session" thing regardless of when/how you restore.

          Or do you find a way to remember previous sessions too?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #5

          @JonB
          Hi mine still remembers it.
          I open another project and remove the first one.
          Close creator.
          Then i open the creator again, and it showing the non folded project.
          Then i loaded the closed project and it still
          had the folding info.
          So not sure when it will not be remembered.

          JonBJ 1 Reply Last reply
          1
          • mrjjM mrjj

            @JonB
            Hi mine still remembers it.
            I open another project and remove the first one.
            Close creator.
            Then i open the creator again, and it showing the non folded project.
            Then i loaded the closed project and it still
            had the folding info.
            So not sure when it will not be remembered.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #6

            @mrjj
            Sigh :(
            I just closed my project, opened an old one to discuss with someone. When I returned to the original project it had forgotten all folds :( So I assumed that was because I had changed project, so it was no longer "the previous session"....

            Now I can't repro that. In which case, how & when does Creator manage to forget all my folds? (I don't delete project.) I swear it must have a mind of its own/gremlins, sometimes....

            mrjjM 1 Reply Last reply
            1
            • JonBJ JonB

              @mrjj
              Sigh :(
              I just closed my project, opened an old one to discuss with someone. When I returned to the original project it had forgotten all folds :( So I assumed that was because I had changed project, so it was no longer "the previous session"....

              Now I can't repro that. In which case, how & when does Creator manage to forget all my folds? (I don't delete project.) I swear it must have a mind of its own/gremlins, sometimes....

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @JonB
              No sure. i cant reproduce here.
              I have been using load last session since day one so maybe why i never noticed.

              JonBJ 1 Reply Last reply
              0
              • mrjjM mrjj

                @JonB
                No sure. i cant reproduce here.
                I have been using load last session since day one so maybe why i never noticed.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #8

                @mrjj
                I think it is indeed something to do with using "sessions". If I sometimes do click to open a project from the list of projects it does not restore, but if I do it via "last session" it does. How this gets me when swapping between project I'm not sure.

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jkwok678
                  wrote on last edited by
                  #9

                  Wait, what I mean is that I want to fold/hide implementations of complete methods and have that save so that next time I open the project in Qt creator, I don't have to hide them again

                  mrjjM 1 Reply Last reply
                  0
                  • J jkwok678

                    Wait, what I mean is that I want to fold/hide implementations of complete methods and have that save so that next time I open the project in Qt creator, I don't have to hide them again

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #10

                    @jkwok678
                    hi
                    yes if you enable session then yes.
                    Also you can clone the session and rename it and always have one where its folded as you want.
                    But jonB have seen it forgets it so it might have issues :)

                    https://doc.qt.io/qtcreator/creator-project-managing-sessions.html

                    JonBJ 1 Reply Last reply
                    1
                    • mrjjM mrjj

                      @jkwok678
                      hi
                      yes if you enable session then yes.
                      Also you can clone the session and rename it and always have one where its folded as you want.
                      But jonB have seen it forgets it so it might have issues :)

                      https://doc.qt.io/qtcreator/creator-project-managing-sessions.html

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #11

                      @mrjj said in Hiding implementation in cpp files:

                      Also you can clone the session and rename it and always have one where its folded as you want.

                      But then, over time your file contents change, so I assume it's useless restoring to an old session, it won't know where to do the folds now?

                      For @jkwok678, just try as @mrjj says, set the session to auto-restore, and see how it goes for you.

                      mrjjM 1 Reply Last reply
                      0
                      • JonBJ JonB

                        @mrjj said in Hiding implementation in cpp files:

                        Also you can clone the session and rename it and always have one where its folded as you want.

                        But then, over time your file contents change, so I assume it's useless restoring to an old session, it won't know where to do the folds now?

                        For @jkwok678, just try as @mrjj says, set the session to auto-restore, and see how it goes for you.

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        @JonB
                        I not sure it stores the project in the session, only bookmarks, folding and such things.
                        But i did not test this thesis.

                        JonBJ 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @JonB
                          I not sure it stores the project in the session, only bookmarks, folding and such things.
                          But i did not test this thesis.

                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by JonB
                          #13

                          @mrjj said in Hiding implementation in cpp files:

                          I not sure it stores the project in the session, only bookmarks, folding and such things.

                          Hmm. So I think you're saying: it's not to do with saving "old" sessions. By cloning the current default session, and saving it under the name of my project, I can use that named project session always with my project, and that named session will get updated with latest folds/bookmarks as I then change my project? If I switch over to some other session for some other project, I can still then return to the saved, named session for my main project and get back to where last saved?

                          I'm going to try working like that now, and see how it goes.

                          But then, if I change projects and it retains session to save to, my new project will start saving to my reserved session? What I want is: each project should save its folds/bookmarks wherever associated with that project, and restore from that, and save to that, period. I don't need to manage multiple sessions, I just want separate ones for each project. Automatically.

                          Don't you just love Qt/Creator? ;-)

                          mrjjM 1 Reply Last reply
                          0
                          • JonBJ JonB

                            @mrjj said in Hiding implementation in cpp files:

                            I not sure it stores the project in the session, only bookmarks, folding and such things.

                            Hmm. So I think you're saying: it's not to do with saving "old" sessions. By cloning the current default session, and saving it under the name of my project, I can use that named project session always with my project, and that named session will get updated with latest folds/bookmarks as I then change my project? If I switch over to some other session for some other project, I can still then return to the saved, named session for my main project and get back to where last saved?

                            I'm going to try working like that now, and see how it goes.

                            But then, if I change projects and it retains session to save to, my new project will start saving to my reserved session? What I want is: each project should save its folds/bookmarks wherever associated with that project, and restore from that, and save to that, period. I don't need to manage multiple sessions, I just want separate ones for each project. Automatically.

                            Don't you just love Qt/Creator? ;-)

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            @JonB
                            Hi
                            Yeah but sessions are not a project thing. Its a workspace.
                            So a session can have one or more open projects.
                            But yeah it would be useful if one could clone a session and then tie to a project so when you open that project the session would also open but not sure the design ever intended to work like that.

                            Yeah I love creator :)

                            JonBJ 1 Reply Last reply
                            2
                            • mrjjM mrjj

                              @JonB
                              Hi
                              Yeah but sessions are not a project thing. Its a workspace.
                              So a session can have one or more open projects.
                              But yeah it would be useful if one could clone a session and then tie to a project so when you open that project the session would also open but not sure the design ever intended to work like that.

                              Yeah I love creator :)

                              JonBJ Offline
                              JonBJ Offline
                              JonB
                              wrote on last edited by
                              #15

                              @mrjj said in Hiding implementation in cpp files:

                              Yeah but sessions are not a project thing. Its a workspace.
                              So a session can have one or more open projects.

                              Ooohhhh, thanks!

                              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