Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Restart App
QtWS25 Last Chance

Restart App

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 3 Posters 4.6k 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.
  • H Offline
    H Offline
    hasnain
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rohanpm
      wrote on last edited by
      #2

      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
      0
      • L Offline
        L Offline
        lyuts
        wrote on last edited by
        #3

        [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
        0

        • Login

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