def mouseReleaseEvent(self, event): if event.button() == QtCore.Qt.LeftButton: self.emit(QtCore.SIGNAL('clicked()')) if self.__mousePressPos is not None: moved = event.globalPos() - self.__mousePressPos self.position = QtGui.QCursor.pos() JSONfunctions.update_pos(self, self.rect().topLeft(), NotesOnDisplay, NotesOnDisplayJSON) JSONfunctions.save(NotesOnDisplayJSON, SIZE, FONTSIZE) if moved.manhattanLength() > 3: event.ignore() return