ScreenCapture QML Type

The ScreenCapture type is used for capturing a screen. 更多...

导入语句: import QtMultimedia
Since: Qt 6.5
实例化: QScreenCapture

特性

详细描述

ScreenCapture captures a screen. It is managed by MediaCaptureSession where the captured view can be displayed in a window or recorded to a file.

The code below shows a simple capture session with ScreenCapture playing back the captured primary screen view in VideoOutput .

CaptureSession {
    id: captureSession
    screenCapture: ScreenCapture {
        id: screenCapture
        active: true
    }
    videoOutput: VideoOutput {
        id: videoOutput
    }
}
					

另请参阅 ScreenCapture and CaptureSession .

特性文档编制

active : bool

Describes whether the capturing is currently active.


[read-only] error : string

Returns a code of the last error.


[read-only] errorString : string

Returns a human readable string describing the cause of error.


screen : bool

Describes the screen for capturing.


window : Window

Describes the window for capturing.