I can't seem to be able to figure out how to get this work.
I have a webview in my app, and I want every link clicked on it to open in the system's default browser. The app lets the user choose one from a list of URLs and displays a small description webpage of said url, which has a link to the actual website. I want this link to be opened in an external browser.

This is what I have, regarding the problem:

App.cpp:

Qt Code:
  1. webWidget = new QWebView(this);
  2.  
  3. webWidget->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
  4.  
  5. connect(webWidget, SIGNAL(linkClicked (const QUrl &)), this, SLOT(urlClicked(const QUrl &)));
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void App::urlClicked(QUrl & link)
  2. {
  3. qDebug() << link.toString();
  4. QDesktopServices::openUrl(link);
  5. }
To copy to clipboard, switch view to plain text mode 
and in App.h,the slot
Qt Code:
  1. void urlClicked(QUrl & link);
To copy to clipboard, switch view to plain text mode 


But since the QUrl never gets sent to the slot(the debug line doesn't print anything), I'm assuming I'm missing something, but haven't been able to figure out what it is.