title: How do we get Qt to render to memory rather than a device?
body: <p>I have an application that uses Qt 5.6 for various purposes and that runs on an embedded device. Currently I have it rendering via eglfs to a Linux frame buffer on an attached display but I also want to be able to grab the data and send it to a single-color LED display unit (a device will either have that unit <em>or</em> a full video device, never both at the same time).</p>
  
  <p>Based on what I've found on the net so far, the best approach is to:</p>
  
  <ul>
  <li>turn off anti-aliasing;</li>
  <li>set Qt up for 1 bit/pixel display device;</li>
  <li>select a 1bpp font, no grey-scale allowed; and</li>
  <li>somehow capture the graphics scene that Qt produces so I can transfer it to the display unit.</li>
  </ul>
  
  <p>It's just that last one I'm having issues with. I suspect I need to create a surface of some description and inject that into the Qt display "stack", but I cannot find any good examples on how to do this.</p>
  
  <p>How does one do this and, assuming I have it right, is there a synchronisation method used to ensure I'm only getting complete buffers from the surface (i.e., no tearing)?</p>