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

QWebEngineView becomes all black when calling winId

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.9.1
    • WebEngine
    • None
    • win7

    Description

      QWebEngineView becomes all black after show full screen. code:

      TestWebView::TestWebView(QWidget *parent) : QWidget(parent)
      {
          QWebEngineView* w = new QWebEngineView(this);
          w->setUrl(QUrl("http://www.bing.com"));
      
          QPushButton* ptr_one = new QPushButton(this);
          ptr_one->setFixedSize(30, 30);
          connect(ptr_one, &QPushButton::clicked, this, [=]() {
              if (this->isFullScreen())
              {
                  this->showNormal();
              }
              else
              {
                  this->showFullScreen();
              }
          });
      
          QHBoxLayout* ptr_top_layout = new QHBoxLayout;
          ptr_top_layout->addWidget(ptr_one);
      
          QVBoxLayout* ptr_layout = new QVBoxLayout;
          ptr_layout->setSpacing(0);
          ptr_layout->setContentsMargins(0, 0, 0, 0);
          ptr_layout->addLayout(ptr_top_layout);
          ptr_layout->addWidget(w);
          setLayout(ptr_layout);
      
          QWidget* ptr_widget = new QWidget(this);
          ptr_widget->winId();
      }
      
      

      click the button on the top than webview show all black.

      Attachments

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              crowww Wang Brazen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes