I work at my homework in Qt Creator, where I paint to QWidget and I need to save some part of this QWdiget.
I tried to solve this problem:
QPixmap pixma
From QWidget::Grab:
QPixmap QWidget::grab(const QRect &rectangle = QRect(QPoint(0, 0), QSize(-1, -1)))