Am 08.02.2013 um 17:27 schrieb "K. Frank" <kfrank2...@gmail.com>:
> Hello Jason!
>
> ...
>
> Obviously, that would add a bit of a layer of complications, but as
> Thiago said, using console input is not "Qt-approved," so some
> level of complication is to be expected.
To give you some ideas you might run into trying to do a "blocking read on
stdin":
http://www.mail-archive.com/interest@qt-project.org/msg01940.html
Especially when it comes to "multi-platform".
I am not saying that it is not possible, but you will end up using native APIs.
Qt being traditionaly a GUI framework does not provide a solution to "read
stdin in a console application way".
In the end in my "split processes with different privileges in the context of a
Mac Sandbox application"-learning project I used a QLocalSocket for IPC
(initially I also thought that I could simply use QProcess' stdin/stdout for
that, but see above). Despite the fact that my GUI application has no "network
privilege" it still can write/read to/from a local socket.
The "network enabled process" is a simple QCoreApplication which listens on the
local socket "forever" where it receives commands such as "send that JPEG data
to an AppleTV", "Discover AppleTVs", "Quit" etc.
Cheers,
Oliver
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest