Forum Discussion

John_OR's avatar
John_OR
Occasional Contributor
7 years ago

Python cluelessness with lists

Hi, I'm trying to transition from VBScript to Python and having some trouble understanding lists in Python.  What I'm trying to do is find all the comboboxes in a dialog and add them to a list.  Once...
  • John_OR's avatar
    John_OR
    7 years ago

    It looks like I figured it out.  I changed :

    combos = [(dlg.FindAllChildren(QtClassName,"OnOneComboBox",7))]

     

    to

     

    combos = list(dlg.FindAllChildren(QtClassName,"OnOneComboBox",7))

     

    Removing the brackets per your suggestion and adding "list" did the trick.  Now setting the index is working and I'm able to append to the list.