[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    [Kde-bindings] C#, Qyoto, Qt - How to read output from QProcess?
From:       linuxoidoz () yahoo ! com ! au
Date:       2010-02-17 12:31:12
Message-ID: 201002172231.12340.linuxoidoz () yahoo ! com ! au
[Download RAW message or body]

Hello,

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>();
			arguments.Add("-i");
			arguments.Add("video.avi");
			arguments.Add("video.mp4");
			proc.Start(program, arguments);
			Connect(proc, SIGNAL("readyReadStandardOutput()"), this, SLOT("updateLog()"));
		}
		
		[Q_SLOT]
		private void updateLog() {
			QByteArray data = proc.ReadAllStandardOutput();
			QTextCodec codec = QTextCodec.CodecForUtfText(data);
			string str = codec.ToUnicode(data);
			txtEdit.Append(str);
		}

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.
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic