ScreenRecorder.py 文件源码

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

项目:pyqt5 作者: yurisnm 项目源码 文件源码
def __init__(self):
        super(Recorder, self).__init__()

        self.setWindowFlags(Qt.CustomizeWindowHint)
        self.setAttribute(Qt.WA_TranslucentBackground)

        self.layout_outer = QVBoxLayout()
        self.widget_inner = QWidget()
        self.layout_inner = QVBoxLayout()
        self.layout_bar = QHBoxLayout()
        self.layout_timer = QHBoxLayout()
        self.layout_btns = QHBoxLayout()

        self.widget_inner.setLayout(self.layout_inner)
        self.layout_outer.addWidget(self.widget_inner)

        self.layout_inner.addLayout(self.layout_bar)
        self.layout_inner.addStretch(-1)
        self.layout_inner.addLayout(self.layout_timer)
        self.layout_inner.addLayout(self.layout_btns)

        self.setLayout(self.layout_outer)

        self.style = """
            .QWidget{
                background-color: #080f1c;
                border-radius: 10px;
            }
        """

        self.screencast_number = 0

        self.widget_inner.setStyleSheet(self.style)

        self.init_bar()
        self.init_timer()
        self.init_buttons()
        self.setFixedWidth(self.btn_size.width()*3+50)

        self.dir_name = "."
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号