QWindowCapture#
This class is used for capturing a window. More…
New in version 6.6.
Synopsis#
Properties#
active
- Whether the capturing is currently activeerror
- The code of the last errorerrorString
- Human readable string describing the cause of errorwindow
- The window for capturing
Functions#
def
captureSession
()def
error
()def
errorString
()def
isActive
()def
setWindow
(window)def
window
()
Slots#
Signals#
def
activeChanged
(arg__1)def
errorChanged
()def
errorOccurred
(error, errorString)def
windowChanged
(window)
Static functions#
def
capturableWindows
()
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.
See also
- class PySide6.QtMultimedia.QWindowCapture([parent=None])#
- Parameters:
parent –
PySide6.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..
- Access functions:
isActive
()setActive
(active)Signal
activeChanged
(arg__1)
- property PᅟySide6.QtMultimedia.QWindowCapture.error: Error#
This property holds the code of the last error..
- Access functions:
error
()Signal
errorChanged
()
- property PᅟySide6.QtMultimedia.QWindowCapture.errorString: str#
This property holds a human readable string describing the cause of error..
- Access functions:
errorString
()Signal
errorChanged
()
- property PᅟySide6.QtMultimedia.QWindowCapture.window: PySide6.QtMultimedia.QCapturableWindow#
This property holds the window for capturing..
See also
- Access functions:
window
()setWindow
(window)Signal
windowChanged
(window)
- 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:
Getter of property error
.
- PySide6.QtMultimedia.QWindowCapture.errorChanged()#
Notification signal of property error
.
- PySide6.QtMultimedia.QWindowCapture.errorOccurred(error, errorString)#
- Parameters:
error –
Error
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
Setter of property active
.
- PySide6.QtMultimedia.QWindowCapture.setWindow(window)#
- Parameters:
See also
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:
See also
Getter of property window
.
- PySide6.QtMultimedia.QWindowCapture.windowChanged(window)#
- Parameters:
Notification signal of property window
.