screenshot

mantidplot.screenshot(widget, filename, description, png_exists=False)

Take a screenshot of the widget for displaying in a html report.

The MANTID_SCREENSHOT_REPORT environment variable must be set to the destination folder. Screenshot taking is skipped otherwise.

Parameters:
  • widget – QWidget to grab.
  • filename – Save to this file (no extension!).
  • description – Short descriptive text of what the screenshot should look like.
  • png_exists – if True, then the ‘filename’ already exists. Don’t grab a screenshot, but add to the report.