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. Making an app launch an app
Forum Updated to NodeBB v4.3 + New Features

Making an app launch an app

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.4k 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.
  • N Offline
    N Offline
    nicky j
    wrote on last edited by
    #1

    Hey!
    I was wondering if there is a way to launch an application from another application. I have made 2 applications (app A and app B for our purposes). Is there a way that I could create a button in App A that when clicked would launch App B? The answer is probably obvious, but any help would be greatly appreciated.
    Thanks!

    1 Reply Last reply
    0
    • J Offline
      J Offline
      juansta
      wrote on last edited by
      #2

      Does QProcess do what you need?

      1 Reply Last reply
      0
      • N Offline
        N Offline
        nicky j
        wrote on last edited by
        #3

        Yes, it looks like it should. How would I go about using it though?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          juansta
          wrote on last edited by
          #4

          Something like this I guess...
          Have ou read over the doco?
          @QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), "", tr("Files (.)"));
          QProcess *Process = new QProcess (this);

          Process ->start(fileName);

          Process ->waitForFinished ();@

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Gennon
            wrote on last edited by
            #5

            Or if you want to have the first app to fire and forget you can use QProcess::startDetached().

            http://qt-project.org/doc/qt-5.0/qtcore/qprocess.html#static-public-members

            But then you lose the control of the new app.

            /Gen

            1 Reply Last reply
            0
            • N Offline
              N Offline
              nicky j
              wrote on last edited by
              #6

              thats a neat trick. 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