Use a QLabel with a QPixmap and place it in a layout next to the line edit. You can set the pixmap to be a check mark, an X, or nothing depending on how you want to display the status of the edit field's contents.

You could also think about using a QValidator or a QCompleter on the line edit if that is feasible to prevent the user from entering the wrong thing in the first place.