Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to use QWebPage::OpenLinkInNewWindow?
nicky j last edited by
I would like my web browser to open a link in a new window and I noticed this: QWebPage::OpenLinkInNewWindow.
I have connected the signal and slot, but I am unable to open the link. I believe this has to do with a limitation of the triggered() signal. Does anyone know how I can get the link to go to the slot?
Heres the code:
connect(webView->pageAction(QWebPage::OpenLinkInNewWindow), SIGNAL(triggered()), mainView_object_pointer, SLOT(newWindowLink(QUrl url)));
thebeast44 last edited by
haven't actually tried it, but I think what you're looking for is
QAction * QWebPage::action ( WebAction action ) const
void QAction::setData ( const QVariant & userData )