title: Printing really huge image on plotter using QPrinter
body: <p>I have to print on plotter world map with a lot of vector data on it from Qt based app. Plotter has 80 GB hard drive, to print high resolution images. All data is loaded in QGraphicsScene. </p>
  
  <pre><code>QGraphicsScene *scene;
  
  .....
  
  QPrinter *printer = new QPrinter(QPrinter::ScreenResolution);
  printer-&gt;setPaperSize(QPrinter::A4);
  
  QPainter painter(printer);
  painter.setRenderHint(QPainter::Antialiasing);
  </code></pre>
  
  <p>A4 is using for improve speed during tests.</p>
  
  <pre><code>forever
  {
     if(printedHeight &gt;= sceneHeight)
     {
         isPrintingRunning = false;
         qDebug() &lt;&lt; "Printing finished";
         break;
     }
  
     ...loading next tile strip
  
     scene-&gt;render(&amp;painter, toPage(sceneRect), tileStripRect);
     scene-&gt;clearStrip;
     printedHeight += stripHeight;
  }
  </code></pre>
  
  <p>After loading vector data, i'm loading tiles(256x256 px) by horizontal strips, render strip to painter, clear tiles from scene, than again. Because i'm rendering by strips scene doesn't exceed available memory, but QPainter doesn't send data to printer until it will be deleted, that's why my app very quickly run out of memory. There is an opportunity to call QPainter::end() each cycle step, but in this way each strip is printed on differrent page on ordinary printer, so I suppose plotter will cut each strip, as soon as i can't control plotter's knife. So this is not a solution. How can I force QPainter to send data and clear its cache, but stay in the same print session?</p>