Unsolved Why iframe triggered QWebPage::acceptNavigationRequest(url, QWebEnginePage::NavigationTypeLinkClicked, false), not QWebEnginePage::NavigationTypeTyped?
-
I am using qt5.10.1
webengine
module. I encountered a weird thing thatiframe triggered QWebPage::acceptNavigationRequest(url, QWebEnginePage::NavigationTypeLinkClicked, false)
. More detailed as follow.QUrl url = QUrl::fromLocalFile(":/resource/index.html"); QWebEngineView *view = new QWebEngineView; QWebEnginePage *page = new QWebEnginePage; view->setPage(page); view->load(url);
QWebPage::acceptNavigationRequest is triggered as
QWebEnginePage::NavigationTypeLinkClicked
for its type and "www.google.com.hk" for its url then. I thinkQWebEnginePage::NavigationTypeTyped
is the right type.index.html is something like
<!DOCTYPE html> <html> <head> </head> <body> <textarea id="output">a test html</textarea><br/> <iframe width=900, height=500, src="http://www.google.com.hk"><iframe> </body> </html>
Is there something wrong with my
index.hmtl
? If not, why does it happen and how can I disable this trigger? -
@dscyw I'm facing the same issue. Have you found a solution?