QWindowCapture#

This class is used for capturing a window. More

Inheritance diagram of PySide6.QtMultimedia.QWindowCapture

New in version 6.6.

Synopsis#

Properties#

  • active - Whether the capturing is currently active

  • error - The code of the last error

  • errorString - Human readable string describing the cause of error

  • window - The window for capturing

Functions#

Slots#

Signals#

Static functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

The class captures a window. It is managed by the QMediaCaptureSession class where the captured window can be displayed in a video preview object or recorded to a file.

class PySide6.QtMultimedia.QWindowCapture([parent=None])#
Parameters:

parentPySide6.QtCore.QObject

Constructs a new QWindowCapture object with parent.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.QtMultimedia.QWindowCapture.active: bool#

This property holds whether the capturing is currently active..

See also

start() stop()

Access functions:
property PᅟySide6.QtMultimedia.QWindowCapture.error: Error#

This property holds the code of the last error..

Access functions:
property PᅟySide6.QtMultimedia.QWindowCapture.errorString: str#

This property holds a human readable string describing the cause of error..

Access functions:
property PᅟySide6.QtMultimedia.QWindowCapture.window: PySide6.QtMultimedia.QCapturableWindow#

This property holds the window for capturing..

Access functions:
PySide6.QtMultimedia.QWindowCapture.Error#

Enumerates error codes that can be signaled by the QWindowCapture class. errorString() provides detailed information about the error cause.

Constant

Description

QWindowCapture.NoError

No error

QWindowCapture.InternalError

Internal window capturing driver error

QWindowCapture.CapturingNotSupported

Window capturing is not supported

QWindowCapture.CaptureFailed

Capturing window failed

QWindowCapture.NotFound

Selected window not found

PySide6.QtMultimedia.QWindowCapture.activeChanged(arg__1)#
Parameters:

arg__1 – bool

Notification signal of property active .

static PySide6.QtMultimedia.QWindowCapture.capturableWindows()#
Return type:

.list of QCapturableWindow

Returns a list of QCapturableWindow objects that is available for capturing.

PySide6.QtMultimedia.QWindowCapture.captureSession()#
Return type:

PySide6.QtMultimedia.QMediaCaptureSession

PySide6.QtMultimedia.QWindowCapture.error()#
Return type:

Error

Getter of property error .

PySide6.QtMultimedia.QWindowCapture.errorChanged()#

Notification signal of property error .

PySide6.QtMultimedia.QWindowCapture.errorOccurred(error, errorString)#
Parameters:
  • errorError

  • errorString – str

Signals when an error occurs, along with the errorString.

PySide6.QtMultimedia.QWindowCapture.errorString()#
Return type:

str

Getter of property errorString .

PySide6.QtMultimedia.QWindowCapture.isActive()#
Return type:

bool

Getter of property active .

PySide6.QtMultimedia.QWindowCapture.setActive(active)#
Parameters:

active – bool

See also

isActive()

Setter of property active .

PySide6.QtMultimedia.QWindowCapture.setWindow(window)#
Parameters:

windowPySide6.QtMultimedia.QCapturableWindow

See also

window()

Setter of property window .

PySide6.QtMultimedia.QWindowCapture.start()#

Starts capturing the window .

This is equivalent to setting the active property to true.

PySide6.QtMultimedia.QWindowCapture.stop()#

Stops capturing.

This is equivalent to setting the active property to false.

PySide6.QtMultimedia.QWindowCapture.window()#
Return type:

PySide6.QtMultimedia.QCapturableWindow

See also

setWindow()

Getter of property window .

PySide6.QtMultimedia.QWindowCapture.windowChanged(window)#
Parameters:

windowPySide6.QtMultimedia.QCapturableWindow

Notification signal of property window .