[Interest] Finish QLineEdit editing when user clicks anywhere outside the QLineEdit

John Weeks john at wavemetrics.com
Wed Aug 14 19:57:43 CEST 2019


Ah. In our case, the QLineEdit is inside (and parented by) a widget that provides the background of the window. That parent widget can accept focus, so I guess our cases are not quite the same.

> On Aug 14, 2019, at 9:35 AM, Murphy, Sean <smurphy at walbro.com> wrote:
> 
>> I used the QLineEdit  focusOutEvent() event.
> 
> Can you elaborate on that? Because when I tested yesterday, if the user clicks on something that does NOT grab focus (for example, any whitespace that exists in the layout between widgets), the line edit never gets a focusOutEvent().
> 
> I need it to work if the user clicks ANYWHERE outside the QLineEdit, and there's no way for me to predict/guarantee what the user is going to click on...
> 
> Sean
> 
> 
> This message has been scanned for malware by Forcepoint. www.forcepoint.com
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

-John



More information about the Interest mailing list