Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qt session
Forum Updated to NodeBB v4.3 + New Features

qt session

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 4 Posters 1.5k 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.
  • JonBJ JonB

    @shree_121
    No idea what this might mean? "Sessions"? "Restart the system"? "excute the next loop not from first loop"? ...

    S Offline
    S Offline
    shree_121
    wrote on last edited by
    #3

    @JonB thanks for reply. I am restarting CPU in for loop so after restart my application should autolaunch and restore all for loop values sothat it will execute second loop. Is it possible?

    JonBJ 1 Reply Last reply
    0
    • S shree_121

      @JonB thanks for reply. I am restarting CPU in for loop so after restart my application should autolaunch and restore all for loop values sothat it will execute second loop. Is it possible?

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

      @shree_121
      You are rebooting the machine inside a "for" loop?? And after reboot you want the application to start up again, get to the same place it was in some for loop in your application code, and restart from there? Seriously?

      S 1 Reply Last reply
      3
      • JonBJ JonB

        @shree_121
        You are rebooting the machine inside a "for" loop?? And after reboot you want the application to start up again, get to the same place it was in some for loop in your application code, and restart from there? Seriously?

        S Offline
        S Offline
        shree_121
        wrote on last edited by
        #5

        @JonB yes, not possible??

        JonBJ 1 Reply Last reply
        0
        • S shree_121

          @JonB yes, not possible??

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

          @shree_121
          Well it sounds pretty crazy, but if that's what you really want to do...

          Of course it is not possible to have a program restart at some arbitrary point just because you feel like it (other than maybe if you're under Linux and deliberately create a core dump and reload from there, but we won't get into that...).

          You will have, in some shape or form, to save whatever you need to know (your "session state") to some external file/registry/whatever just before you restart the machine, and then when your program gets reloaded (which won't happen automatically, unless you have it auto-starting on boot) it will have to read that data and have code to get it back to whatever the appropriate point is in your code to be able to continue from where it left off.

          None of which has anything to do with Qt....

          S 1 Reply Last reply
          1
          • JonBJ JonB

            @shree_121
            Well it sounds pretty crazy, but if that's what you really want to do...

            Of course it is not possible to have a program restart at some arbitrary point just because you feel like it (other than maybe if you're under Linux and deliberately create a core dump and reload from there, but we won't get into that...).

            You will have, in some shape or form, to save whatever you need to know (your "session state") to some external file/registry/whatever just before you restart the machine, and then when your program gets reloaded (which won't happen automatically, unless you have it auto-starting on boot) it will have to read that data and have code to get it back to whatever the appropriate point is in your code to be able to continue from where it left off.

            None of which has anything to do with Qt....

            S Offline
            S Offline
            shree_121
            wrote on last edited by
            #7

            @JonB
            Thanks for your help.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              Hi,

              Depending on how you do it, QSessionManager might be of use. Note that this is a functionality that's usually tied to the desktop environment in use.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              S 1 Reply Last reply
              1
              • SGaistS SGaist

                Hi,

                Depending on how you do it, QSessionManager might be of use. Note that this is a functionality that's usually tied to the desktop environment in use.

                S Offline
                S Offline
                shree_121
                wrote on last edited by
                #9

                @SGaist Thank you
                Do you have any small example how QsessionManager will work?

                RatzzR 1 Reply Last reply
                0
                • S shree_121

                  @SGaist Thank you
                  Do you have any small example how QsessionManager will work?

                  RatzzR Offline
                  RatzzR Offline
                  Ratzz
                  wrote on last edited by
                  #10

                  @shree_121
                  Here is an small example for Handling X11 Session Management .

                  --Alles ist gut.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    shree_121
                    wrote on last edited by
                    #11

                    Hi@Ratzz ,
                    i followed your example i am not able to restore pushButton clicked event. Can Qsessionmanager also restores the QpushButton press events? Because i don't want start my for loop again and if i have to click on button after reboot then for loop starts from zero.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      No, you can't restore such a thing. You have to design your loop so it can be started from a "save point". Then on startup reload the data and that "save point" and start the loop.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1

                      • Login

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