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. Qt creator
Forum Updated to NodeBB v4.3 + New Features

Qt creator

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 851 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.
  • T Offline
    T Offline
    Tyagiait
    wrote on last edited by
    #1

    Hello,

    My problem question is same as asked in thread 11687 but i want to show the output in continous manner.
    Like if i m installing a software then first line of process shown in terminal to be displayed in textbox and then the second one while the process still running.

    how i m gona achieve this…
    help me out in this…..
    Thanks……

    1 Reply Last reply
    0
    • A Offline
      A Offline
      akonradwesolutions
      wrote on last edited by
      #2

      QProcess does have a signal readyRead() that is triggered whenever process output is available from the standard output of your process. Connect a slot to this signal and use readAll() to obtain all output that is currently available.

      @
      // ...
      myProcess = new QProcess(parent);

      QObject::connect(myProcess, SIGNAL(readyRead()), obj, SLOT(processOutput()));

      myProcess->start("myexecutable");
      // ...
      @

      @
      // ...
      public slots:
      void processOutput() {
      QByteArray data = myProcess->readAll();
      // Process output ...
      }
      // ...
      @

      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