This bug seems to have nothing to do with the createWindow function. In QWebEngineView, when a user clicks on a link on a web page, a signal will be triggered: urlChanged(QUrl) But QWebEngineView will not automatically load new links.
So you need to create a new slot function for urlChanged(QUrl) yourself and manually load the new link in the parameters yourself. For example:
//Webpage link address //Triggered by the user clicking on the webpage //There is a problem with QWebEngineView. When the user clicks a link in the webpage, it only triggers the urlChanged(QUrl) signal //Does not automatically load new Linking web pages requires manual loading void MainWindow::onUrlChanged(const QUrl &url) {
In
QWebEngineView
there are the following methods:This method will be triggered when the left mouse button is clicked. You can overload it and use your own implementation.
This bug seems to have nothing to do with the createWindow function.
In QWebEngineView, when a user clicks on a link on a web page, a signal will be triggered:
urlChanged(QUrl)
But QWebEngineView will not automatically load new links.
So you need to create a new slot function for urlChanged(QUrl) yourself and manually load the new link in the parameters yourself.
For example:
//Webpage link address
//Triggered by the user clicking on the webpage
//There is a problem with QWebEngineView. When the user clicks a link in the webpage, it only triggers the urlChanged(QUrl) signal
//Does not automatically load new Linking web pages requires manual loading
void MainWindow::onUrlChanged(const QUrl &url)
{
}
**
Sample code: http://pan.baidu.com/s/1gfc7BXp
**