Hi,all,
I want intercept the action OpenLinkInNewWindow, and open the url in my own window. How can I do?
I have try like this:
QWebView window = new QWebView;
window->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
connect(window->page()->action(QWebPage::OpenLinkInNewWindow),SIGNAL(triggered()),this,SLOT(handleOpenInNewWindowRequest()));
QWebView window = new QWebView;
window->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
connect(window->page()->action(QWebPage::OpenLinkInNewWindow),SIGNAL(triggered()),this,SLOT(handleOpenInNewWindowRequest()));
To copy to clipboard, switch view to plain text mode
Is my way right?
Added after 1 17 minutes:
I will do a application base on videos website. So my application can show webpage. All the pages will show in my application, If user click a video link and want to play it, and then this page will be open in my player, (so I need analyse the link whether include a video source),and this player is base on webpage too. You can think it as a browser too. It's different with the main application is in the UI.
So my question above is just for "openning a video link in my player".
Bookmarks