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. How to get external App into foreground ?

How to get external App into foreground ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 210 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.
  • ademmlerA Offline
    ademmlerA Offline
    ademmler
    wrote on last edited by ademmler
    #1

    Hi,

    I use the routine below to launch external applications.
    I am searching for a way to bring those external apps into the foreground
    and give it a higher priority - while they are running.

    thx Alexander

    void MyApp::startExternalApp(QString cmd, QStringList arguments)
    {
        this->setCursor(QCursor(Qt::BusyCursor));
    
        mcProcess = new QProcess(this);
        mcProcess->start(cmd, (QStringList) arguments);
    
        bool success = mcProcess->waitForStarted(0);
        qDebug() << mcProcess->program() << " " << mcProcess->arguments() << "started" << success;
    
        success = mcProcess->waitForFinished(5000);
        qDebug() << mcProcess->program() << " " << mcProcess->arguments() << "finished" << success;
        qDebug() << "Process error:" << mcProcess->error();
        qDebug() << "Process exit code:" << mcProcess->exitCode();
        qDebug() << "Process state:" << mcProcess->state();
    
        this->setCursor(QCursor(Qt::ArrowCursor));
    }
    
    1 Reply Last reply
    0
    • JoeCFDJ Online
      JoeCFDJ Online
      JoeCFD
      wrote on last edited by
      #2

      is mcProcess running a gui app?

      ademmlerA 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        is mcProcess running a gui app?

        ademmlerA Offline
        ademmlerA Offline
        ademmler
        wrote on last edited by
        #3

        @JoeCFD Yes it does

        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