【发布时间】:2019-05-22 19:24:42
【问题描述】:
我正在尝试在视频播放器 (QVideoWidget) 上叠加一些图形 (QtGraphicsView)。我已经尝试将 QtGraphicsView 子类样式表设置为透明和背景画笔,但没有一个工作。
#self.setBackgroundBrush(QtGui.QBrush(QtGui.QColor(30, 30, 30, 3)))
#self.setStyleSheet("background-color:rgba(0,0,0,0)")
#self.setStyleSheet("background:rgba(0,0,0,0)")
self.setStyleSheet("background:transparent")
self.setStyleSheet("background-color:transparent")
self.setStyleSheet("background-color:rgba(30,30,30,3)")
self.setStyleSheet("background:rgba(30,30,30,3)")
实际意图是轻松裁剪视频(视觉方式)。所有其他工作都完成了关于捕获事件、做数学等。这张图片很好地解释了情况。。在这一点上感觉,我肯定做错了,在 QtMultiMedia 组件中必须有一些更简单的方法来绘制它们。任何想法都非常感谢。
【问题讨论】:
标签: python pyqt pyqt5 qgraphicsview qtmultimedia