提交 45fdab22 编写于 作者: 之一Yo's avatar 之一Yo

修复下拉框没有默认选中第一个选项的问题 (#399)

上级 8f384090
......@@ -92,6 +92,8 @@ class ComboBoxBase(QObject):
"""
item = ComboItem(text, icon, userData)
self.items.append(item)
if len(self.items) == 1:
self.setCurrentIndex(0)
def addItems(self, texts: Iterable[str]):
""" add items
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册