Skip to content

Commit 237531a

Browse files
committed
refactor(tools_qt): enhance QComboBox initialization by directly adding string items
1 parent 7fe1c40 commit 237531a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools_qt.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ def __init__(
163163
elif widget_type == "QComboBox":
164164
self.widget = QComboBox(self)
165165
if options:
166-
fill_combo_values(self.widget, options)
166+
if isinstance(options[0], str):
167+
self.widget.addItems(options)
168+
else:
169+
fill_combo_values(self.widget, options)
167170
elif widget_type == "QCheckBox":
168171
self.widget = QCheckBox(self)
169172
else:

0 commit comments

Comments
 (0)