Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt WebKit interpretation of target="new"



  • I'm trying to help my team solve a way to get Qt WebKit view to interpret the html code:
    @<a href="foo.html" target="new">go to foo</a>@

    to pop a new webkit view as a new OS level window. Any hints as to where to look to enable this functionality are much appreciated.

    Best,
    -k



  • Did you sublcass [[Doc:QWebView]] and did you reimplement "QWebView::createWindow() ":/doc/qt-4.8/qwebview.html#createWindow?



  • semafore thanks for the question
    volker thanks for the anwser
    this thing was also required for me
    after reimplenting the protected function
    there will be a paramter QWebPage::WebWindowType type
    it is an enum http://qt-project.org/doc/qt-4.8/qwebpage.html
    QWebPage::WebBrowserWindow 0 The window is a regular web browser window.
    QWebPage::WebModalDialog 1 The window acts as modal dialog.
    you will hvae to check which is the one and perform the task for that one



  • one question hot to get the url which is to be opened in QWebView::createWindow() how to get the url


Log in to reply