提交 ee6933f9 编写于 作者: K Kentaro Wada

Not use setHidden but completion

上级 d25fd724
......@@ -64,7 +64,8 @@ class LabelDialog(QtWidgets.QDialog):
self.setLayout(layout)
# completion
completer = QtWidgets.QCompleter()
completer.setCompletionMode(QtWidgets.QCompleter.InlineCompletion)
completer.setFilterMode(QtCore.Qt.MatchContains)
completer.setCompletionMode(QtWidgets.QCompleter.PopupCompletion)
completer.setModel(self.labelList.model())
self.edit.setCompleter(completer)
......@@ -72,10 +73,6 @@ class LabelDialog(QtWidgets.QDialog):
text = self.edit.text().strip()
for i in range(self.labelList.count()):
item = self.labelList.item(i)
if text in item.text():
item.setHidden(False)
else:
item.setHidden(True)
def addLabelHistory(self, label):
if self.labelList.findItems(label, QtCore.Qt.MatchExactly):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册