I have a button QPushButton - pushButton_menu
What I want to achieve: On button hover I need to run method onMenuButtonHover and print text of the button (need to access the button)
This is my code:
self.pushButton_menu.enterEvent = self.onMenuButtonHover
@pyqtSlot()
def onMenuButtonHover(self, event):
button = self.sender()
print(type(button))
On hover method is called properly, but button is always of type NoneType
When I tried with clicked.connect instead of enterEvent, everything works fine - self.sender() return QPushButton object.
How I can access that QPushButton in method onMenuButtonHover?