On 02/07/12 14:41, Mandeep Sandhu wrote:
>
> As Thiago mentioned, why aren't you using QDir/QFileInfo for this
> requirement? You don't need to run 'ls' to get a dir's contents. Or
> did you use ls just to illustrate your problem?

Yes, it's just an example.

> Also, in your sample code, you're calling myProcess.readAll(), twice!
> The first call to readAll() would empty your process' output buffer
> and hence your second call is not showing any data. Just call
> myProcess.readAllStandardOutput() once and store the contents in your
> bytearray.
>

The multiple read calls were just for debugging purposes. I didn't 
realise that the output buffer would be emptied after the first read call.

Anyway, that was the answer, thank you Mandeep.

-- 
Regards,
Phil
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to