Screen Capture Widget

The screen capture widgets makes it easy to take screenshots. Similar to pressing CMD+SHIFT+4/CMD+SHIFT+3 on the mac, this widget implements several different ways in which the screen can be captured, either via a cross hair style selection or by grabbing the entire screen.

screen_grab.get_desktop_pixmap(rect)[source]

Performs a screen capture on the specified rectangle.

Parameters:rect (QRect) – Rectangle to capture
Returns:Captured image
Return type:QPixmap
screen_grab.screen_capture(cls)

Modally displays the screen capture tool.

Returns:Captured screen
Return type:QPixmap
screen_grab.screen_capture_file(output_path=None)[source]

Modally display the screen capture tool, saving to a file.

Parameters:output_path – Path to save to. If no path is specified, a temp path is generated.
Returns:path where screenshot was saved.