title: How to design a program with Qt frontend and separable backend?
body: <p>I want to develop a <strong>Qt frontend</strong> for a program which needs to be usable from a command line as well. First, I thought of solving this with a parameter (if it is set, then UI will be created, else just write on <code>std::out</code>) but I've got the feeling that <strong>I should separate those components</strong> and just create the program for the <strong>backend logic</strong> ( using plain c++ if possible ). In which case the Qt program can read, and understand the output of the backend. Still if needed the backend could be run alone writing its results on <code>std::out</code>.</p>
  
  <p>What's the most elegant way to call the backend program from the frontend, <strong>without blocking?</strong></p>
  
  <p>My first thought on this was creating a child process and with exec, call the backend, then if the backend is finished, it should signal the frontend and block until frontend is done with reading, where reading could be done through a pipe or something like that.</p>
  
  <p><strong>Is this a good approach? Any other tips for implementation?</strong></p>