Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42216

QWebEngineView and createWindow()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.0 Beta, 5.4.0
    • Fix Version/s: 5.6.2
    • Component/s: WebEngine
    • Environment:
      Windows 7 x64, MSVC 2013
    • Commits:
       3855015600418107485b31b0ec2bfa5b987787e7

      Description

      Hello there!

      I have a problem with Qt5.4. I have QWebEngineView and some page with JS popup. I want open this popup in same QWebEngineView. In QWebView i just write in createWindow() "return this", but with QWebEngineView this not work.

      But if i use QWebView instead of QWebEngineView everything works fine.

      webview.h
          #ifndef WEBVIEW_H
          #define WEBVIEW_H
           
          #include <QWebEngineView>
           
          class WebView : public QWebEngineView {
           
              Q_OBJECT
           
          public:
              explicit WebView(QWidget *parent = 0);
           
          private:
              QWebEngineView* createWindow(QWebEnginePage::WebWindowType);
          };
           
          #endif // WEBVIEW_H
      
      
      webview.cpp
          #include "webview.h"
           
          WebView::WebView(QWidget *parent) : QWebEngineView(parent) {
          }
           
          QWebEngineView* WebView::createWindow(QWebEnginePage::WebWindowType) {
              return this;
          }
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              jbornema Joerg Bornemann
              Reporter:
              bratsinot Aleksander
              Votes:
              3 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes