> 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.

Ok, good! I thought I missed something. In my case, that is a problem since the 
user can click anywhere, including widgets that don't accept focus. And to make 
my custom line edit class portable, I shouldn't know or care anything about 
what other widgets are out there in the entire application.

I'm going down a path that seems to be working so far - using an event filter 
installed on the qApp instance that looks for mouse clicks and reports back to 
the line edit whether the click occurred within the line edit or not. If it is 
within, I just let QLineEdit handle it normally, if it's outside, then I finish 
editing. I still need to test more, but so far it's looking like what I want to 
do.

Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to