[Interest] QWebEngineView, internal links, & the urlChanged signal

Andy asmaloney at gmail.com
Fri Apr 13 18:14:08 CEST 2018


I am generating a report as an HTML document and displaying it with a
QWebEngineView. This report uses internal links such as <a
href="#project_summary">.

I have been using the following to add "Back" and "Forward" capabilities to
a QWebEngineView:

   connect( mWebView, &QWebEngineView::urlChanged, this, [=] () {
      mUI->mActionBack->setEnabled( mWebView->history()->canGoBack() );
      mUI->mActionForward->setEnabled( mWebView->history()->canGoForward()
);
   } );

It seems that QWebEngineView::urlChanged is no longer emitted when clicking
on these internal links even though the URL has changed.

Is this a regression or should I be using a different signal? (I don't see
any that look like they apply...)

Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180413/12420b96/attachment.html>


More information about the Interest mailing list