Well.. it really depends how you want it to behave. Do you actually want it only to happen when clicking or when the widget gains focus. As for actual implementation, use the "modified" property of the line edit to see if the text was changed by the user.
Bookmarks