How get a focus element in QWebView/QWebPage?
问题 i need to be able to react on focus changes in QWebPage. I used microFocusChanged() signal and it gives me almost desirable behavior, but anyway i don't know how to know which element is selected. I want to do some actions when any editable element on page gets or loses focus. Thank you in advance 回答1: To handle any HTML event within a page you do the following: Create QObject with callback slots to receive the events. It may be some dedicated handler object or an existing object like your