I'm writing console app, based QCoreApplication
, and I want to get signals, when user input something into stdin (whole line at once or by characters, it is not important for my app).
QFile
not emit signals according to documentation, so any ideas how to get signal if user put in something to stdin
?
At now I'm working with qt 4.8.7/linux/amd64, but I want port this code to macosx and windows in the future.
Update
I found solution that should work on *nix based OS
, like linux
and mac os x
:
https://gist.github.com/gjorquera/2576569
But what about windows, would it also with with QSocketNotfier
?