I am using QWebView in this way:
QWebView *window = new QWebView();
window->setUrl(QString("my url"));
window->show();
And it works. I see the html page I want. The problem is this. By default, if you "right-click" the link, the "Open in a new window" action will be shown, but if I click on it, nothing will happen. If I "left click" on the same link, it works. Therefore, the problem is that QWebView does not open new windows. Does anyone know why?
I have another problem. Some links are a pdf file, so I expect QWebView to ask me to download it or run an application to open it. But instead, nothing happens. I think the problem is that no new windows can be opened by QWebView, not PDF.
Obviously, I tested the page using a web browser, and everything works well, so the problem is with some QWebView settings.
Does anyone know how to get QWebView to open new windows as needed?
Notes:
<a href="./something.htm" TARGET="_parent">Some link</a>
- The pdfs link uses this syntax (nothing happens when I click):
<a href="./pdf/mydoc.pdf" TARGET="pdfwin">Some pdf</a>