getScreenshot()

This function takes a screenshot, which can be saved with imageToFile().

Synopsis

anytype getScreenshot(int screenNum = -1)

Parameters

Parameter Description
screenNum The number of the screen to be captured. The default value is -1.

Return value

The returned value contains a qvariant Variable, which can be passed to the existing function imageToFile() to save the screenshot to the disk.

Description

The function captures the whole virtual desktop with all screens when screenNum is given as "-1". If any other number is given, it captures the specified screen.

When a screen number is given that does not exist or is not available then nothing will happen. I.e.: no screenshot is made or stored on the disk and no message is displayed in the Logviewer.

Assignment

Miscellaneous functions

Availability

UI