def __init__(self, i_description_str, i_parent = None):
super(SafeConfirmationDialog, self).__init__(i_parent)
vbox = QtWidgets.QVBoxLayout(self)
self.description_qll = QtWidgets.QLabel(i_description_str)
vbox.addWidget(self.description_qll)
self.line_edit = QtWidgets.QLineEdit(self)
vbox.addWidget(self.line_edit)
self.button_box = QtWidgets.QDialogButtonBox(
QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel,
QtCore.Qt.Horizontal,
self
)
vbox.addWidget(self.button_box)
self.button_box.accepted.connect(self.accept)
self.button_box.rejected.connect(self.reject)
# -accept and reject are "slots" built into Qt
safe_confirmation_dialog.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录