I need to grab a widget in order to save it as an image file. I use the following code:
QPixmap img = this->webView->grab();
img.save("image.PNG);
This doesn't work though when the application has been minimized or the grabbed widget is a child of QStackedWidget or QTabWidget.
Please, help me solve this problem.
Try this: