How to determine whether a select's child element is visible on browser's screen area?



  • I'd like to determine whether a sepecific select's child element, is visible on browser's screen area? For example, give a HTML select like this:

    alt text

    Give I have, say, QWebElement of "Breve" option (4th item) how do I determine whether visible in the browser?
    I've tried:
    bool isVisible = myWebView->geometry().contains(e.geometry());
    where myWebView is of QWebView type and e is QWebElement



  • In QtWebKit 5.212 you obtain focused QWebElement by tracking focusedElementChanged signal on QWebPage. We should probably add getter to make it full-fledged property.

    Note that not everything that you can select on page is element, and geometry of text selection is not available in public API at the moment


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.