How to make LineEdit unfocus when you click outside it's border?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By slightly_seasoned

Insert Title Text Here

:bust_in_silhouette: Reply From: exuin

Detect click, check if click event location is outside of the borders of the line edit, call release_focus() on the line edit if so.