self.ui.BTE.mousePressEvent(QMouseEvent=)
If you are trying to fire a mouse event to test your code, this is not the way to do it. You need to post an actual event to the Qt event loop so it can be processed and eventually sent to your event filter. See QCoreApplication::postEvent() or QCoreApplication::sendEvent() for the details. I do not know for sure whether sendEvent() will activate your event filter or not, so you would have to test that. If it doesn't work, then you'll have to use postEvent() instead.

In C++, an eventFIlter() method must return a Boolean true or false to determine whether the event handling stops (true - the event filter "eats" the event) or continues (false - to be also handled by the object it is intended for). If you are not interested in the event at all, then you have to call the superclass eventFilter() method and return its true / false return value. If you don't follow these rules, then your line edit might fail to work at all.

See the documentation for QObject::eventFilter() which shows how to correctly implement eventFilter() in a MainWindow class.

If I were doing this, I would not use a dialog-based class to show the message. I would create a QToolTip instance as a member of your class, call QToolTip::showText() in the mouse pressed event, and call QToolTip::hideText() in both the mouse release and leave events for your line edit. You could also start a QTimer when you show the tooltip, and hide the tooltip when the timeout event fires.

Doing it with a QDialog means the user has to click somewhere else to dismiss the dialog, and it removes the focus from the line edit in the process. I guarantee this will lead to more UI problems.