[Kde-bindings] C#, Qyoto, Qt - How to read output from QProcess?

Arno Rehn arno at arnorehn.de
Sat Feb 20 11:26:40 UTC 2010

On Saturday 20 February 2010 08:03:12 linuxoid.au at gmail.com wrote:
> > Or simply use QByteArray.ConstData() which should give you a C# string
> > directly.
> I tried this:
> 		[Q_SLOT]
> 		private void updateLog() {
> 		    QMessageBox.About(this, "About", "Converting");
> 			QByteArray data = proc.ReadAllStandardOutput();
> 			string str = data.ConstData();
> 			basicvideowin.txtLog.Append(str);
> 		}
> and the message never pops up, that is readyReadStandardOutput() never
> fires, nor does anything get written into the TextEdit box.
Have you considered that the signal simply doesn't fire because there is no 
output ready to be read? I don't know when Qt fires this signal, but afaik 
ffmpeg has some sort of progress display on the terminal which does not follow 
the usual "text, newline" pattern. Have you tried replacing the ffmpeg 
invocation with a different, more simple command like "echo foo bar"?

Arno Rehn
arno at arnorehn.de

More information about the Kde-bindings mailing list