def mouseReleaseEvent(self, event): Text.mouseReleaseEvent(self, event) self.scene().session.commit()