PDA

View Full Version : How to use QCloseEvent to change QLineEdit



Kaluss
22nd June 2013, 22: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
23rd June 2013, 00:58
You could install an event filter on the QlineEdit using QObject::installEventFilter and check for the corresponding event as explained in the documentation.