I am using a QWebView in this way:
QWebView *window = new QWebView();
window->setUrl(QString("my url"));
window->show();
And it works. I can see the html page I want. The problem is this. By default if I "right click" on a link the action "Open in new window" is shown but if I click on it, nothing happens. If I "left click" on the same link it works. So the problem is that no new windows are open by QWebView. Does anyone know why?
I have another problem. Some links are pdf file so I expect that QWebView ask me to download it or to run an application to open it. But nothing happens instead. I think the problem is related to the fact that no new windows are allowed to be opened by QWebView and not on the pdf.
Obviously I tested the page with a web browser and everything work well, so the problem is in some settings of QWebView.
Does anyone know how to make QWebView open new windows when required?
Notes:
all links are local resources.
The html links use this syntax (and they works):
<a href="./something.htm" TARGET="_parent">Some link</a>
- The link to pdfs use this syntax (nothing happens when I click):
<a href="./pdf/mydoc.pdf" TARGET="pdfwin">Some pdf</a>
<a href="http://google.com" target="_NEW">Click Me</a>
, you have the same issue. – Viniferous