'How to take a screenshot of a particular QWidget in a tab in QT and post it in another tab?

I have a tab that is to display data that is to be prepared for a report. Kind of like a preview. What I want is to take a screenshot of graph generated in another tab.

Kind of similar to scanning an image. So the initial tab generates 3 graphs under each other that fit in the screen. I basically want the screen shots of the graphs to post them along with the data in the second tab.

enter image description here

enter image description here

The second image is where I want the content of the first image to be posted. How do I go on about that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source