小编has*_*eeb的帖子

如何在透明的 QVideoWidget 顶部绘制 QtGraphicsView

我试图在视频播放器(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)")
Run Code Online (Sandbox Code Playgroud)

实际意图是轻松裁剪视频(视觉方式)。所有其他工作都是关于捕获事件、做数学等。这张图片很好地解释了情况。pyqt5 用户界面. 在这一点上,我感觉肯定是我做错了,QtMultiMedia 组件中必须有一些更简单的方法来绘制它们。任何想法真的很感激。

python pyqt qgraphicsview pyqt5 qtmultimedia

2
推荐指数
1
解决办法
1446
查看次数

标签 统计

pyqt ×1

pyqt5 ×1

python ×1

qgraphicsview ×1

qtmultimedia ×1