Hello,
i am new in Qt3 and linux world: so my questions can be stupid for some of you ...sorry
I have to do a GUI interface in Qt of a perl programm. So i put a QTextEdit in a window, implement a QProcess, and try to have stdout from konsole to my QTextEdit. And try to write from my app to the konsole.
I try lots of tutorials but without success:
1/In my constructor of window:
2/in my button click:
myProc->addArgument("konsole");
myProc->addArgument("-e");
myProc->addArgument("pet"); // my exe perl
connect(myProc, SIGNAL(readyReadStdout(), this, SLOT(readFromStdout()));
myProc->start();
3/My slot:
void MyWin::readFromStdout()
{
myTextEdit->append(myProc->readStdout());
}
4/ for writing i use:
myProc->writeToStdin(myString);
1/In my constructor of window:
myProc = new QProcess(this);
2/in my button click:
myProc->addArgument("konsole");
myProc->addArgument("-e");
myProc->addArgument("pet"); // my exe perl
connect(myProc, SIGNAL(readyReadStdout(), this, SLOT(readFromStdout()));
myProc->start();
3/My slot:
void MyWin::readFromStdout()
{
myTextEdit->append(myProc->readStdout());
}
4/ for writing i use:
myProc->writeToStdin(myString);
To copy to clipboard, switch view to plain text mode
The perl app start in a konsole but nothing is read or write in my text edit. Is there someone to help me ?
Thanks a lot
Bookmarks