If you have a layout set for your main window( and you should ), you can use layout()->itemAt() and if the mouse position is inside the items geometry.
You should do this for all the QPushButton items, in a loop.
Anyway, even if it works, this is a wrong solution.
The way to go is to reimplement mouseEnterEvent and mouseLeaveEvent in your buttons and emit signals when these events occur.
Regards
Bookmarks