def __init__(self, parent, index):
super(CommentTypeDialog, self).__init__(parent)
self.setAttribute(Qt.WA_DeleteOnClose, True)
self.setWindowFlags(dialogwindowflags)
self.setWindowTitle(_("Comment Type"))
self.index = index
self.commenttypedialoglayout = QVBoxLayout()
self.commenttypedialoglayout.setContentsMargins(0, 0, 0, 0)
self.commenttypebuttons = []
for x in commenttypeoptions:
self.button = QPushButton(x, self)
self.button.setFlat(True)
self.commenttypebuttons.append(self.button)
for i in range(len(self.commenttypebuttons)):
self.commenttypebuttons[i].clicked.connect(partial(self.clickedDialogButton, i))
for x in self.commenttypebuttons:
self.commenttypedialoglayout.addWidget(x)
self.setLayout(self.commenttypedialoglayout)
评论列表
文章目录