Hello folks,
I'll execute a system command on a Linux maschine. I've created this in a QProcess, but the result was very small.
process
->start
(QFile::encodeName(cmd
).
data(),
QStringList() <<
"-l" <<
"| grep" <<
"xorg");
process->waitForFinished();
qDebug() << tmp;
QString cmd("dpkg");
QProcess* process = new QProcess(this);
process->start(QFile::encodeName(cmd).data(), QStringList() << "-l" << "| grep" << "xorg");
process->waitForFinished();
QString tmp = process->readAll();
qDebug() << tmp;
To copy to clipboard, switch view to plain text mode
The return has a length from one line. This is wrong if I type dpgk -l | grep xorg I becomes over 20 Lines.
If I try this:
process->start(QFile::encodeName(cmd).data(), QStringList() << "-l");
To copy to clipboard, switch view to plain text mode
So, with one argument all works fine, if I had more as one argument, the result ist not correctly.
Can someone tell me how to fix the argument list?
Thanks.
so long
jd
// Sorry wrong forum, can someone move my post.
Bookmarks