I am trying to use QProcess to call a perl script. Here is my code:
Window.h
private slots:
void processIT();
private:
private slots:
void processIT();
void output(const QString &text);
private:
QProcess process;
To copy to clipboard, switch view to plain text mode
Window.cpp
void Window::processIT()
{
connect(process,SIGNAL(readyReadStandardOutput()),
this,
SLOT(output
(const QString &)));
connect(process,
SIGNAL(readyReadStandardError
(const QString &)),
this,SLOT(output()));
QString program
("perl /home/jim/perlQt/moalq.pl ");
program += path;
process.start(program);
}
//....
void Window
::output(const QString &text
) {
out->append(text);
}
void Window::processIT()
{
connect(process,SIGNAL(readyReadStandardOutput()),
this,SLOT(output(const QString &)));
connect(process,SIGNAL(readyReadStandardError(const QString &)),
this,SLOT(output()));
QString path(dirEdit->text());
QString program("perl /home/jim/perlQt/moalq.pl ");
program += path;
process.start(program);
}
//....
void Window::output(const QString &text)
{
out->append(text);
}
To copy to clipboard, switch view to plain text mode
my app compiles but I get the following at runtime:
[HTML]Object::connect: No such slot Window:rocess()[/HTML]
Any ideas?
Bookmarks