I'm developing a GUI dialog using PyQT4 which imports some data into a Pandas DataFrame and then plots the data to an embedded Matplotlib canvas.
I'd like to pass a list of variable from the DataFrame to the combo box. My first attempt was:
list = list(df.parameter,unique())
self.FirstComboBox = QtGui.QComboBox()
self.FirstComboBox.addItems(list)
But on running this I get
TypeError: QComboBox.addItems(QStringList): argument 1 has unexpected type 'list'
I've seen examples where a sorted list of dict keys is passed to a combo box, so I'm confused that I can't pass a list.