Okay first I tweaked your code to be more pythonic/pyqtish in form removing some of the dangerous items and replacing PyQt4 references with PyQt5 references if you have any questions as to why do ask so that I can explain the whys of it -- so without further ado here she be
from PyQt5.QtWidgets import QApplication, QDialog, QVBoxLayout from PyQt5.QtWidgets import QFrame, QLabel class CustomWidget(QFrame): def __init__(self, Name): QFrame.__init__(self) self.setFrameStyle(QFrame.StyledPanel) self.WdgtName = Name self.lblName = QLabel(self.WdgtName) VBox = QVBoxLayout() VBox.addWidget(self.lblName) self.setLayout(VBox) def enterEvent(self, event): print('Entering ', self.WdgtName) def leaveEvent(self, event): print('Leaving ', self.WdgtName) class TestWindow(QDialog): def __init__(self): QDialog.__init__(self) self.resize(640, 480) self.Widget1 = CustomWidget('One') self.Widget2 = CustomWidget('Two') self.Widget1.layout().addWidget(self.Widget2) MainLayout = QVBoxLayout() MainLayout.addWidget(self.Widget1) self.setLayout(MainLayout) if __name__ == '__main__': MainEventThread = QApplication([]) MainApp = TestWindow() MainApp.show() MainEventThread.exec()Now when executing this upon Entering One -- It denotes this upon Entering Two it denotes this BUT it does not denote we have left One because we have not. This because Two is contained within One. If I go back to One then it denotes I have left Two but if while in Two I move the mouse outside the entire window then it denotes that I have left Two and One -- in that order