[Qt-interest] qprocess cannot run unix commands?

Gabriele Kahlout gabriele at mysimpatico.com
Mon Jun 7 12:53:18 CEST 2010


Hello, I was wondering why this result is empty in:

  QProcess gzip;

    gzip.start("bash");

    assert(gzip.waitForStarted());

   gzip.write("ls");

   gzip.closeWriteChannel();

   QByteArray result = gzip.readAll();

   cout << result.data() ;

   gzip.close();


is this true:
http://www.linuxquestions.org/questions/programming-9/problems-running-console-commands-using-qprocess-672207/

The documentation illuded me that my code should work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100607/cfe1bc1a/attachment.html 


More information about the Qt-interest-old mailing list