title: Is it practical to have a model which uses no Qt classes but to use a Qt view?
body: <p>Assume that I have a simulation (the "model") which at the moment runs in the console and doesn't have any Qt specific code. Lets pretend it has a ball class</p>
  
  <pre><code>struct Ball
  {
       unsigned int unique_id;
       float x;
       float y;
  };
  </code></pre>
  
  <p>Using QGraphicsScene with QGraphicsView and either QGraphicsItem or QGraphicsPolygonItem I can also draw shapes (a circle say) in any given position on the scene using Qt. </p>
  
  <p>Ideally I would like to continue using Qt for displaying the balls (as it is easy to use in that regard) but not intertwine Qt with my model (so that I can easily swap parts of the model in and out). Is there a "nice" way to associate the balls in my model with the QGraphicsItems that I can draw on the screen? If not what is the correct way to do this in Qt?</p>