video_frame_player.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:SantosGUI 作者: santosfamilyfoundation 项目源码 文件源码
def __init__(self, parent = None):
        QtWidgets.QWidget.__init__(self, parent)
        self.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Preferred)

        self.label = QtWidgets.QLabel(self)

        self.pause = QtWidgets.QPushButton('Play/Pause',self)
        self.pause.clicked.connect(self.playPause)

        self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal, self)
        self.slider.valueChanged.connect(self.sliderChanged)

        self.status = QtWidgets.QLabel(self)
        self.status.setAlignment(QtCore.Qt.AlignRight |
            QtCore.Qt.AlignVCenter)

        # Sets the image frames for this player to display
        self.frame_rate = 30
        self.max_frame_rate = 5.0
        self.currentFrame = 0
        self.frames = []
        self.timer = None

        self.redraw_signal.connect(self.updateImage)

        topLayout = QtWidgets.QVBoxLayout(self)
        topLayout.addWidget(self.label)
        layout = QtWidgets.QHBoxLayout(self)
        layout.addWidget(self.pause)
        layout.addWidget(self.slider)
        topLayout.addLayout(layout)
        self.setLayout(topLayout)

        self.reconfigurePlayer()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号