widgets.py 文件源码

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

项目:vidcutter 作者: ozmartian 项目源码 文件源码
def __init__(self, errors: list, parent=None, flags=Qt.WindowCloseButtonHint):
        super(ClipErrorsDialog, self).__init__(parent, flags)
        self.errors = errors
        self.parent = parent
        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowTitle('Cannot add media file(s)')
        self.headingcolor = '#C681D5' if self.parent.theme == 'dark' else '#642C68'
        self.pencolor = '#FFF' if self.parent.theme == 'dark' else '#222'
        self.toolbox = ClipErrorsDialog.VCToolBox(self)
        self.toolbox.currentChanged.connect(self.selectItem)
        self.detailedLabel = QLabel(self)
        self.buttons = QDialogButtonBox(self)
        closebutton = self.buttons.addButton(QDialogButtonBox.Close)
        closebutton.clicked.connect(self.close)
        closebutton.setDefault(True)
        closebutton.setAutoDefault(True)
        closebutton.setCursor(Qt.PointingHandCursor)
        closebutton.setFocus()
        introLabel = self.intro()
        introLabel.setWordWrap(True)
        layout = QVBoxLayout()
        layout.addWidget(introLabel)
        layout.addSpacing(10)
        layout.addWidget(self.toolbox)
        layout.addSpacing(10)
        layout.addWidget(self.buttons)
        self.setLayout(layout)
        self.parseErrors()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号