I am having a problem with the .itemClicked() method in PyQt4.
When I use it regularly Ex:
listObj.itemClicked.connect(some_function)
I can use it in a function
def some_function(self,ITEM):
but I tried pass in another argument with the partial function from functools
listObj.itemClicked.connect( partial(some_function, extra_argument) )
and it replaces the ITEM with the extra_argument.
I also tried using the lambda function
listObj.itemClicked.connect(lambda: some_function(item, extra_argument))
this would work but it would return a tuple that would be stuck on my first item that I clicked.
Ex.
def some_function(self, ITEM, extra_argument):
str(Item[0].text) # this would return a tuple with the second item
# empty.
I checked around but all I could find was passing extra arguments on a button.
Thank you,