workaround so only one CTRL-C is required for a new prompt in --gui=qt
(cherry picked from commit 8d42c46f1aa5d94953fb7c3cde9d58758f661c70)