def METHOD_NAME(self):
    filenames = QtWidgets.QFileDialog.getSaveFileName(self, "Select export file")
    if not filenames[0]:
        return
    rect_size = self._scene.sceneRect().size()
    img_size = QtCore.QSize(int(rect_size.width()), int(rect_size.height()))
    img = QtGui.QImage(img_size, QtGui.QImage.Format_ARGB32_Premultiplied)
    painter = QtGui.QPainter(img)
    self._scene.render(painter)
    img.save(filenames[0])
    painter.end()