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. QProcess: show window of console application and get access to application status at the same time ?
Forum Updated to NodeBB v4.3 + New Features

QProcess: show window of console application and get access to application status at the same time ?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.6k 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.
  • M Offline
    M Offline
    MHermann
    wrote on last edited by
    #1

    Hello,
    I have to start a console application from my Qt application.
    Therefore I am using QProcess and start().
    The task manager shows me that the console application was started successfully. But no console is shown.
    I also tried it with startDetached(). Then the console is show, but then I am not able to get the status of the console application, because (as the function name says) it is detached from my Qt application.
    Can anyone tell me how I can start a console application with a shown console and have access to the status of the console application at the same time?

    Greetings,
    MHermann

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

      Hi and welcome to devnet,

      Can you show the code where you use QProcess ? Also on which OS/Qt combo are you working ?

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

        Hi,

        I am using Qt4.7.1 and I am working on Windows 7 64bit.

        @
        // ...
        QString programAndArguments;
        programAndArguments += ""example.exe"";
        programAndArguments += " -x -y";

        QProcess *m_processAvrdude;
        m_processAvrdude = new QProcess(this);

        m_processAvrdude->start(programAndArguments);
        bool ret = m_processAvrdude->waitForStarted();
        if (ret == true)
        // ...
        @

        And as I mentioned in my post before the process starts but the belonging console isn't shown.

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

          Pretty old version of Qt, are you locked to it ?

          Please take a look at QProcess's documentation to build the argument list

          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
          0

          • Login

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