Quote Originally Posted by simy307 View Post
Using Qt5 and QCoreApplication I want to create a timed menu that waits 15 seconds for a response, and if one is not received, moves on to the eventloop and the rest of the program. This program is ran completely from the console. I have tried using a timed while loop, however

Qt Code:
  1. cin.readLine();
To copy to clipboard, switch view to plain text mode 

stops the loop and waits for a response.

Any ideas on how to go about creating this?
Setup a QSocketNotifier on stdin, connect to its signal and run the event loop (e.g. via QEventLoop). Together with a timer that will quit the loop after 15 seconds, you can set a mechanism appropriate for your task.