[Qt-interest] Hooking up a QIODevice to a unix pipe

Chris chris1.noreply at googlemail.com
Thu Jul 9 18:29:59 CEST 2009


Hi, I'm writing a custom QIODevice to get data from a server (via a
socket). I want to be able to read data from my custom IODevice and
output it to a unix pipe, such that on the command line I can do
something like:

./myapp | unixapp

... where unixapp could be grep, less, whatever.

I'm not quite sure how to go about this. I've considered creating a
named pipe and using QFile to write to the named pipe. Is that the
best way to go? Any suggestions before I embark on this would be very
useful.

TIA, Chris.



More information about the Qt-interest-old mailing list