I have the following code:
self.option = QComboBox(self)
self.option.addItems(self.getJson)
def getJson(self):
self.data = {'image' : ['planet.jpg', 'cat.png', 'building.jpg']}
return self.data['image']
I want to make the return of the getJson
function go to the QComboBox
that I created, however, when I run the code, this error message appears:
TypeError: 'PySide.QtGui.QComboBox.addItems' called with wrong argument types: PySide.QtGui.QComboBox.addItems (method)
How do I get addItems
to return the method without giving this error?