Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Restart App

    Mobile and Embedded
    3
    3
    4382
    Loading More Posts
    • 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.
    • H
      hasnain last edited by

      i want to restart a qt mobile app.
      any ideas how it can be done.
      please help

      1 Reply Last reply Reply Quote 0
      • R
        rohanpm last edited by

        Try one of these options:

        • from within the app, use QProcess::startDetached to start another instance of the app, then exit (the parent) immediately
        • run the app from a kind of wrapper which restarts the app every time it exits, unless it signals somehow that it really wants to exit (e.g. exiting with a certain magic exit code, or touching some known file)
        1 Reply Last reply Reply Quote 0
        • L
          lyuts last edited by

          [quote author="rohanpm" date="1288016351"]

          • from within the app, use QProcess::startDetached to start another instance of the app, then exit (the parent) immediately[/quote]

          I would suggest an improvement for that:

          • fork.
          • in parent: terminate the app.
          • in child: make a delay, so your app gets enough time to terminate and use QProcess as offered above.

          I'm a rebel in the S.D.G.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post