Class: QgsMediaWidget¶
- class qgis.gui.QgsMediaWidget¶
Bases:
PyQt5.QtWidgets.QWidget
The
QgsMediaWidget
class creates a widget for playing back audio and video media files.New in version 3.30.
QgsMediaWidget(parent: QWidget = None) Constructor
Methods
Returns the media path.
Returns the QMediaPlayer object.
Returns the media widget mode.
Sets the media
path
.Sets the media widget
mode
.Sets the video frame height.
Returns the video frame height.
Attributes
- Audio = 0¶
- class Mode¶
Bases:
int
- baseClass¶
alias of
QgsMediaWidget
- Video = 1¶
- actionEvent(self, QActionEvent)¶
- changeEvent(self, QEvent)¶
- childEvent(self, QChildEvent)¶
- closeEvent(self, QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, bool) bool ¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) bool ¶
- hideEvent(self, QHideEvent)¶
- initPainter(self, QPainter)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- mediaPath(self) str ¶
Returns the media path.
- Return type:
str
- mediaPlayer(self) QMediaPlayer ¶
Returns the QMediaPlayer object.
- Return type:
QMediaPlayer
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- mode(self) QgsMediaWidget.Mode ¶
Returns the media widget mode.
- Return type:
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- resizeEvent(self, QResizeEvent)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setMediaPath(self, path: str)¶
Sets the media
path
.- Parameters:
path (str) –
- setMode(self, mode: QgsMediaWidget.Mode)¶
Sets the media widget
mode
.- Parameters:
mode (QgsMediaWidget.Mode) –
- setVideoHeight(self, height: int)¶
Sets the video frame height.
Note
setting the height to 0 is interpreted as a video frame that will expand to fill available height in the widget’s parent layout.
- Parameters:
height (int) –
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- videoHeight(self) int ¶
Returns the video frame height.
- Return type:
int
- wheelEvent(self, QWheelEvent)¶