Hi.
I have problem with QWebView (QWebPage)
Need make script for load html page like:
QWebView * view = new QWebView();
connect(view,
SIGNAL(linkClicked
( const QUrl & )),
this,
SLOT(newsOnLinkClicked
( const QUrl & )));
view
->load
(QUrl("http://newsroot.net"));
view->show();
QWebView * view = new QWebView();
connect(view, SIGNAL(linkClicked ( const QUrl & )), this, SLOT(newsOnLinkClicked ( const QUrl & )));
view->load(QUrl("http://newsroot.net"));
view->show();
To copy to clipboard, switch view to plain text mode
Works fine.
Problem there need open all links in default browser like Firefox or IE.
I try all settings.
QWebPage * wpage = new QWebPage ();
connect(wpage,
SIGNAL(linkClicked
( const QUrl & )),
this,
SLOT(newsOnLinkClicked
( const QUrl & )));
wpage->setLinkDelegationPolicy (QWebPage::DelegateAllLinks);
QWebView * view = new QWebView();
wpage->triggerAction(QWebPage::OpenLink,true);
view->triggerPageAction(QWebPage::OpenLink,true);
connect(view,
SIGNAL(linkClicked
( const QUrl & )),
this,
SLOT(newsOnLinkClicked
( const QUrl & )));
wpage->setView(view);
view
->load
(QUrl("http://newsroot.net"));
view->show();
QWebPage * wpage = new QWebPage ();
connect(wpage, SIGNAL(linkClicked ( const QUrl & )), this, SLOT(newsOnLinkClicked ( const QUrl & )));
wpage->setLinkDelegationPolicy (QWebPage::DelegateAllLinks);
QWebView * view = new QWebView();
wpage->triggerAction(QWebPage::OpenLink,true);
view->triggerPageAction(QWebPage::OpenLink,true);
connect(view, SIGNAL(linkClicked ( const QUrl & )), this, SLOT(newsOnLinkClicked ( const QUrl & )));
wpage->setView(view);
view->load(QUrl("http://newsroot.net"));
view->show();
To copy to clipboard, switch view to plain text mode
Possible some lines not need.
Please help.
Bookmarks