Hello

I've two application A and B.
The first one - A - creates a QProcess in order to call the second one - B -.
The first one - A - listen the second one - B -, using readyRead() signal.

So, our B application send data to A in a loop :
Qt Code:
  1. int i = 0;
  2. while (i<10)
  3. {
  4. std::cout << i << std::endl;
  5. i++;
  6. }
To copy to clipboard, switch view to plain text mode 

The A application detects that data is ready read, and display it :
Qt Code:
  1. QString message = "";
  2. message.append(myProcess->readAllStandardOutput());
  3. std::cout << "." << message.toStdString() << "." << std::endl;
To copy to clipboard, switch view to plain text mode 

And the message is :
.0
1
2
3
4
5
6
7
8
9.
I need to control the message content, in order to use correctly
So, it woul be nice if I could enforce the cout to be written immediately in the B application... Or enforce the A application to not append all the cout content.

Example :
Qt Code:
  1. int i = 0;
  2. while (i<10)
  3. {
  4. std::cout << i << std::endl; // Enforce this to be submitted immediately
  5. i++;
  6. }
To copy to clipboard, switch view to plain text mode 

And the message would be :
.0.
I could have 10 messages, and not just one.

Have you got an idea ?