I suspect you do not make a call to the original focusInEvent()
when you override it. Your function should look something like:
def focusInEvent(self,...):
QParent.focusInEvent(self,...)
# the rest of your code
where QParent
is the nearest base class for your widgets is.
Either that, or make sure you call focusInEvent()
on your QLineEdit
widgets as part of your function.
Given the comments, it sounds like you are dynamically reassigning the focusInEvent
function on the insantiatations in your custom widget. I would either make a derived class for each of the widgets you use that just overrides focusInEvent
as above, or include a line like
type(self).focusInEvent(self,..)
in you function.