Hi,
i have created a test program to check whether i can read the standard output data from the command line utility. So i have called "man" utility as a process. The utilty when executes it prints "What manual page do you want?" I am trying to read this data through readyRead Signal. But i couldnt able to get the output through GUI .Instead its printing the output in the terminal where i am executing the program. How do i solve this problem?
Below is my program.
connect(pushButton_2, SIGNAL(clicked()), this, SLOT(login_call()) );
connect(myProcess , SIGNAL(readyReadStandardOutput()),this, SLOT(readFromStdout()) );
void GoToCellDialog::login_call()
{
myProcess->execute("/usr/bin/man");
textEdit->setText(myProcess->readAll());
}
void GoToCellDialog::readFromStdout()
{
printf("Inside Signal StdOut");
textEdit->append(myProcess->readAllStandardOutput());
}
connect(pushButton_2, SIGNAL(clicked()), this, SLOT(login_call()) );
connect(myProcess , SIGNAL(readyReadStandardOutput()),this, SLOT(readFromStdout()) );
void GoToCellDialog::login_call()
{
myProcess->execute("/usr/bin/man");
textEdit->setText(myProcess->readAll());
}
void GoToCellDialog::readFromStdout()
{
printf("Inside Signal StdOut");
textEdit->append(myProcess->readAllStandardOutput());
}
To copy to clipboard, switch view to plain text mode
Bookmarks