It is necessary that when you hover the mouse over the elements of the toolbar, the value in the status bar does not change. I'm trying to intercept the mouse hover event, but the line change in the status bar still happens.
from PyQt5 import QtWidgets, QtCore import sys class _FilterConstructor(QtCore.QObject): def __init__(self, parent): super().__init__(parent) def eventFilter(self, obj, _event): if _event.type() == QtCore.QEvent.Enter: return True else: return QtCore.QObject.eventFilter(self, obj, _event) class MyWindow(QtWidgets.QMainWindow): def __init__(self): super().__init__() menu = self.menuBar() fileMenu = menu.addMenu('&File') evFilt = _FilterConstructor(fileMenu) fileMenu.installEventFilter(evFilt) self.statusBar().showMessage("line which doesn't want to disappear") if __name__ == '__main__': app = QtWidgets.QApplication(['']) root = MyWindow() root.show() sys.exit(app.exec_())