I have a KTerminalInterface (from kparts) in my qt/kdelib app, and I run a command within it.
The problem is: how can I know if the program is terminated? I need to know it because at its end I must reset some variable.
Does anyone got a similar problem?!?
It isn't possible to communicate with the process once launched via TerminalInterface in KDE 4, since KonsolePart (which implements TerminalInterface) no longer has processExited() or receivedData() signals. In KDE 4, KonsolePart is for interactive terminal sessions, not for your app to use.
In KDE 4, use KProcess to spawn an external command from your app, communicate with it, and detect when it terminates. See the QProcess parts of its API.