How to get mouse position only in Qlabel? I want mouse position to start in qlabel. So: qlabel loop
my code
def mousePressEvent(self, event): ret = self.hasMouseTracking() # Back to mouse MouseTracking The state of self.ui.labelLOOPVIDEO.setText(' The mouse moved :%s' % ret) x = event.x() y = event.y() self.ui.labelLOOPVIDEO.setText(' mouse x coordinate :%s , mouse y coordinate :%s' % (x, y))