Quote Originally Posted by eva2002 View Post
Why is Pass_lineEdit->hasFocus() return 0? I would expect it to be 1
Because Qt is event-driven. You need to return control to the event loop for the focus to change.

Is there any way to determine which widget got focus without having to go through each widget focus property?
QApplication::focusWidget()