PDA

View Full Version : QSocketNorifier on stdin dont fire signal WinXP



dexli
11th December 2013, 11:05
Hi All,

I try to read from stdin in a nonblocking manner. To do so I used the example from here (https://gist.github.com/gjorquera/2576569) with QT 4.8.1

After correcting some typos the connect works but the signal seems not to be emitted.
Two things are remarkable :

1. the console do not echo the keybord input
2. after issuing Crtl-C the former unvisible keybord input appear on console and the program terminates as expected.

the method readCommand will not be called at any time.

I have changed the example a little by moving the constructor from inline in the header file to simple constructor the cpp file, but this do not make a difference.

Can someon give me a hint whats the problem ??

By the way the .pro file contains the CONFIG += console setting

Thanks
dexli

anda_skoa
11th December 2013, 11:35
The terminal could be buffering the input before it sends it to the program.

Depending on what kind of terminal you are using you could search for ways to turn that off.

Cheers,
_

dexli
11th December 2013, 11:56
Hi Anda,

thanks for the quick reply. The console is the normal cmd.exe window.
But even if your assumption is right at least after the <Return> something should happen. Correct ??

all best
dexli


Added after 17 minutes:

Ok meanwhile I found
this bug report (https://bugreports.qt-project.org/browse/QTBUG-15457)
It seems to be still an issue which is not documented :mad:
So I have to found another way

Thanks
dexli