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()
评论列表
文章目录