I am trying to create a Qt application to take a screenshot of a selected area on the screen. I am currently using QRubberBand to select an area of the screen. It works like that.
- When the Capture button clicked on a transparent overlay widget, a pop-up window will appear (full-screen, but without frames).
- I use QRubberBand to select the area of the transparent widget.
Now I need to take a screenshot of the screen I selected.
I think I need to pass the sizes that I get from the QRubberBand selection:
screen->grabWindow( WId window, int x = 0, int y = 0, int width = -1, int height = -1 );
So, how do I get the information I need from QRubberBand? I'm stuck here, so someone please help me!
source
share