QLineEdit lostFocus problem
-
Hi
Can you explain the original issue ?
If you click on lineEdit , then click on keyboard, then
lineedit loose its focus ? -
Hi
Can you explain the original issue ?
If you click on lineEdit , then click on keyboard, then
lineedit loose its focus ? -
@mrjj No, if i click on "1" pushbutton i have to read Target in order to know in wich mylineedit i have to insert "1".
Target is the mylineedit who lost focus
i don't know if it's clear
@thecipo76
well first of all the buttons should have NoFocus set so clicking them do not steal focus.
There is no reason for it to lose focus unless you pop something else up first that takes focus.
But in your case, its not keyboard that steal it but something else
that takes focus while in the window ?? -
@thecipo76
well first of all the buttons should have NoFocus set so clicking them do not steal focus.
There is no reason for it to lose focus unless you pop something else up first that takes focus.
But in your case, its not keyboard that steal it but something else
that takes focus while in the window ?? -
@mrjj Ah.. with NoFocus setted i don't need to subclass QLineEdit
and it's all more easyThank you very much
@thecipo76
Yep it helps a lot. :)
I used qApp->focusWidget(); and sendEvent (key down / key up ) to post the keys to any widget that has keyboard focus and it works pretty well.