im making a qprocess running a program and i have a textfield that prints the output of the program.
im using the folloiwn code to get the output
void mainForm::readFromStdout()
{
outputTextEdit->append( proc->readStdout() );
}
and
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
void mainForm::readFromStdout()
{
outputTextEdit->append( proc->readStdout() );
}
and
connect( proc, SIGNAL(readyReadStdout()),
this, SLOT(readFromStdout()) );
To copy to clipboard, switch view to plain text mode
everything works fine. except the only problem is, this output reads in chunks, rather than smoothly.
even in the example from qt3 for qprocess it says
void UicManager::readFromStdout()
{
// Read and process the data.
// Bear in mind that the data might be output in chunks.
output->append( proc->readStdout() );
}
void UicManager::readFromStdout()
{
// Read and process the data.
// Bear in mind that the data might be output in chunks.
output->append( proc->readStdout() );
}
To copy to clipboard, switch view to plain text mode
i think it has to do with the buffer size set in qprocess->readStdout(). im not sure how to change this. is there anyway to i can make the output append more frequently?
Bookmarks