Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1fdefd

Browse files
committed
Merge pull request #917 from mdboom/qcombobox
formlayout: TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'
2 parents e3499bc + a180e1d commit c1fdefd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/backends/qt4_editor/formlayout.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ def setup(self):
271271
elif isinstance(value, (str, unicode)):
272272
field = QLineEdit(value, self)
273273
elif isinstance(value, (list, tuple)):
274-
selindex = list(value).pop(0)
274+
if isinstance(value, tuple):
275+
value = list(value)
276+
selindex = value.pop(0)
275277
field = QComboBox(self)
276278
if isinstance(value[0], (list, tuple)):
277279
keys = [ key for key, _val in value ]

0 commit comments

Comments
 (0)