Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. How to determine whether a select's child element is visible on browser's screen area?

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

Scheduled Pinned Locked Moved Unsolved Qt WebKit
2 Posts 2 Posters 821 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bob Asm
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Konstantin Tokarev
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved