Get widget when item in a combobox is clicked (model view)



I’m using model-view style coding for the first time. I’ve a combobox in which I’ve applied a model. Added some items in the model. I’ve connected PRESSED signal of view of combox to a function like this.


self.udimCheck() is like this

def udimCheck(self, index)
    widget = self.sender()

This widget which I’m getting is an AbstractItemView object, But I need to get the combobox widget not the view. I looked the documentation. I didn’t find a way to get the combobox when I’ve the view.


Typically, you simply set the model on the combobox and connect the signals to the combobox itself. I don’t think you need to access it’s view… unless you want to do something rather fancy.

Try this: