[Qt-interest] Error encountered while using void setStandardOutputProcess ( QProcess * destination )

Thiago Macieira thiago.macieira at trolltech.com
Wed Jul 22 09:07:58 CEST 2009


Usman Ajmal wrote:
>I made the process1 a  pointer too and removed the processEvents too.
> Still data is not transferring, not even on 127.0.0.1.
>
>On Tue, Jul 21, 2009 at 11:23 PM, Thiago Macieira <
>
>thiago.macieira at trolltech.com> wrote:
>> Usman Ajmal wrote:
>> >    QProcess process1;
>> >    QProcess *process2 = new QProcess(parent);
>> >    process1.setStandardOutputProcess(process2);
>> >    QCoreApplication::processEvents();
>> >    process1.start(command1);
>> >    process2->start(command2, arguments);
>> >}
>>
>> process1 goes out of scope at the }
>>
>> If you want it to live on, make sure it's a pointer.
>>
>> Also, that processEvents() makes no sense where it is.

Did you check if the processes started properly? Which signals did you get 
from the process1 and process2? By the way, did you delete the two 
processes after they emitted finished()? I see you used a parent, the 
parent itself was uninitialised...

Did you also notice that there's an extra space at the end of the 
command2?

    QString command1 = "dd if=/dev/mem";
    QString command2 = "netcat ";

I doubt you have a command called "netcat ".

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090722/240c4177/attachment.bin 


More information about the Qt-interest-old mailing list