def mouseMoveEvent(self, event):
    pos = event.pos()
    if self.is_valid_point(pos):
        if self.mouseClicked:
            self.update_ui(pos)
def mouseMoveEvent(self, event):
    pos = event.pos()
    if self.is_valid_point(pos):
        if self.mouseClicked:
            self.update_ui(pos)