def gridRowHelper(self, label_txt, info_txt=None):
"""Helper to construct the widgets that make up the config UI
grid rows.
Returns (label, info, line_edit) elements.
"""
label = QtWidgets.QLabel(label_txt)
if info_txt:
info = QtWidgets.QToolButton()
info.setIcon(qta.icon('fa.question'))
info.clicked.connect(lambda: self.parent.show_message(info_txt))
else:
info = None
line_edit = QtWidgets.QLineEdit()
return label, info, line_edit
评论列表
文章目录