PDA

View Full Version : How to use QCloseEvent to change QLineEdit



Kaluss
22nd June 2013, 21:28
Hello Guys,
got small problem with my project. Maybe somone knows how can I solve it.

I have the following situation:
Got QObject of my virtual keybord. This object have function void SetLineEdit(QLineEdit *line);

How to run this function every time when user will change focus on QLineObject (mouse action or tab button or new window start) ?

I found QFocusEvent but how to get from it pointer to the right object ?

Thanks in advance for any kind of tip.

Blubbz0r
22nd June 2013, 23:58
You could install an event filter on the QlineEdit using QObject::installEventFilter and check for the corresponding event as explained in the documentation.