- class QWindowCapture¶
This class is used for capturing a window. More…
Added 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
Methods¶
def
__init__()
def
captureSession()
def
error()
def
errorString()
def
isActive()
def
setWindow()
def
window()
Slots¶
def
setActive()
def
start()
def
stop()
Signals¶
def
activeChanged()
def
errorChanged()
def
errorOccurred()
def
windowChanged()
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.Window Capture Limitations¶
The following limitations apply to using
QWindowCapture
:QWindowCapture
is only supported with the FFmpeg backend.
See also
- class 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
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property activeᅟ: bool¶
This property holds whether the capturing is currently active..
- Access functions:
Signal
activeChanged()
- property errorᅟ: QWindowCapture.Error¶
This property holds the code of the last error..
- Access functions:
Signal
errorChanged()
- property errorStringᅟ: str¶
This property holds a human readable string describing the cause of error..
- Access functions:
Signal
errorChanged()
- property windowᅟ: QCapturableWindow¶
This property holds the window for capturing..
See also
- Access functions:
Signal
windowChanged()
Constructs a new
QWindowCapture
object withparent
.- activeChanged(arg__1)¶
- Parameters:
arg__1 – bool
Notification signal of property
activeᅟ
.- static capturableWindows()¶
- Return type:
.list of QCapturableWindow
Returns a list of
QCapturableWindow
objects that is available for capturing.- captureSession()¶
- Return type:
Getter of property
errorᅟ
.- errorChanged()¶
Notification signal of property
errorᅟ
.Signals when an
error
occurs, along with theerrorString
.- errorString()¶
- Return type:
str
Getter of property
errorStringᅟ
.- isActive()¶
- Return type:
bool
Getter of property
activeᅟ
.- setActive(active)¶
- Parameters:
active – bool
See also
Setter of property
activeᅟ
.- setWindow(window)¶
- Parameters:
window –
QCapturableWindow
See also
Setter of property
windowᅟ
.- start()¶
Starts capturing the
window
.This is equivalent to setting the
active
property to true.- stop()¶
Stops capturing.
This is equivalent to setting the
active
property to false.- window()¶
- Return type:
See also
Getter of property
windowᅟ
.- windowChanged(window)¶
- Parameters:
window –
QCapturableWindow
Notification signal of property
windowᅟ
.