I'm trying to implement something that basically mimics a terminal window with Qt using C++. The functionality should be very basic:
- A
QProcess
is started. - Data is read from the
QProcess
and displayed in aQTextEdit
.
The issue is that I want the user to be able to input within the SAME QTextEdit
characters which could be written to the QProcess
. That is, when the QProcess
asks the user for input, I want a signal to be emitted that the process is waiting for an input so that the gui sets an anchor, user starts typing, and this selected text gets communicated (or written) to the process.
So how can I define such a signal, or would like to know if there's a simpler implementation to what I want.