why not use cin and `operator >> ` ?
for the socket trick you have to make sure the buffer is not used. I didn't know that trick was linux only.
you can try this,
as suggested here http://stackoverflow.com/questions/2...use-cin-and-qtQt Code:
QString word; qtin >> word; // This is how you read a word (separated by space) at a time.To copy to clipboard, switch view to plain text mode
Bookmarks