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

linuxoidoz at yahoo.com.au linuxoidoz at yahoo.com.au
Wed Feb 17 12:31:12 UTC 2010


I'm running an ffmpeg process with the following parameters: "ffmpeg -i video.avi video.mp4" and want to display the ffmpeg output in a QTextEdit. Here's my sample code (ffmpeg DOES work, I just can't get its output):

		private void StartCodec() {
			string program = "ffmpeg";
			List<string> arguments = new List<string>();
			proc.Start(program, arguments);
			Connect(proc, SIGNAL("readyReadStandardOutput()"), this, SLOT("updateLog()"));
		private void updateLog() {
			QByteArray data = proc.ReadAllStandardOutput();
			QTextCodec codec = QTextCodec.CodecForUtfText(data);
			string str = codec.ToUnicode(data);

I've checked with Qt Manual, it says:
"void QProcess::readyReadStandardOutput ()   [signal]
This signal is emitted when the process has made new data available through its standard output channel (stdout). It is emitted regardless of the current read channel."

But neither 'readyReadStandardOutput', nor 'ReadyReadStandardOutput', nor any other Ready signal seems to be available in Qyoto for QProcess. And mono complains: "Object::connect: No such signal QProcess::ReadyReadStandardOutput()". 

Also I can't seem to find QString anywhere. Is it available in Qyoto?

Could you please help? Thank you.

More information about the Kde-bindings mailing list