I’m trying to make a front end for a program, and so I’m using QProcess, and specifically start(QString, QStringList). I managed to get output from:
start(”/bin/tar —help”), but when I try to specify a QStringList for arguments (specifically, reading a QLineEdit through QLineEdit->text()), I get total silence from the QProcess.
Here’s a bit of my code:
extraargs = new QLineEdit();
extraargs->setPlaceholderText("extra arguments");
QStringList testtwo;
testtwo << extraargs->text();
...
..
proc->start("/bin/ls", testtwo);
This returns silence. If testtwo were set using testtwo =“some string here” then it would work perfectly, but extraargs->text() doesn’t seem to work. What am I doing wrong here?
↧