Issue with EvenFilter being used by the wrong table
-
@DIRi said in Issue with EvenFilter being used by the wrong table:
the problem is that timetable1 uses the eventfilter after selectionmenu rather the one afteri tself.
I don't know what you think you are doing in this code. You have functions (
def ...
) for each oftimetable1()
andselectionmenu()
. You need classes to have two separate functions both namedeventFilter()
. Your twoeventFilter()
methods are indented inside functions/methodsdef timetable1
/selectionmenu()
. I'm not even sure what that does in Python.return QtCore.QObject.event(source,event)
I would expect the end of an
eventFilter()
to bereturn super().eventFilter(obj, event)
Basically I suggest you go back and read about
eventFilter()
andinstallEventFilter()
and look at examples --- doubtless there are Python ones, e.g. https://doc.qt.io/qtforpython/overviews/eventsandfilters.html#event-filters and https://doc.qt.io/qtforpython/PySide6/QtCore/QObject.html#PySide6.QtCore.PySide6.QtCore.QObject.installEventFilter