void RenderArea::paintEvent(QPaintEvent *event){ QPainter painter(this); if (game.IsGame) { painter.setRenderHint(QPainter::Antialiasing); painter.fillRect(event->rect(), QBrush(Qt::cyan)); game.DrawField(GField); }}
QPainter painter( &pixmap );painter.drawLine( ... ); // draw somepainter.end();
GField.toImage().save( "GField.png", "png" );