2015-02-11 87 views

回答

0

您可以通過執行命中測試得到的元素:

QWebPage webpage = ui->webView->page(); 

QPoint point = webpage->inputMethodQuery(Qt::ImMicroFocus).toRect().center(); 

QWebHitTestResult res = webpage->mainFrame()->hitTestContent(point); 

QWebElement elm = res.element();