Hi,
In the following example you can observe the black block if you run the code. In the same way iam also getting problem when i display video by using its corresponding winId(). its is affecting webengine by displaying black block on it..
When i searched in the net i found QtQTBUG-48130
Calling winId() on a widget breaks QOpenGLWidget/QQuickWidget/QWebEngineView in the same TLW.
QtWebEngine display black block when I called QWidget::winId().
for more information on the bug please visit following link. They said they fixed the bug in 5.6.0 RC
https://bugreports.qt.io/browse/QTBUG-48130
But how to install 5.6.0 RC now.. i dont see it in online installer.. if you provide me information about how to install 5.6.0 RC that will be helpful to me..
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPushButton>
#include <QWebEngineView>
#include <QWidget>
#include <QtCore/QDebug>
//#include <qDebug>
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
#if 1
ui->gridLayout->addWidget(btn);
qDebug()<<btn->winId();
#endif
QWebEngineView *web = new QWebEngineView;
ui->gtridLayout->addWidget(web);
web
->load
(QUrl("http://www.google.com"));
}
MainWindow::~MainWindow()
{
delete ui;
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPushButton>
#include <QWebEngineView>
#include <QWidget>
#include <QtCore/QDebug>
//#include <qDebug>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
#if 1
QPushButton *btn = new QPushButton;
ui->gridLayout->addWidget(btn);
qDebug()<<btn->winId();
#endif
QWebEngineView *web = new QWebEngineView;
ui->gtridLayout->addWidget(web);
web->load(QUrl("http://www.google.com"));
}
MainWindow::~MainWindow()
{
delete ui;
}
To copy to clipboard, switch view to plain text mode
Thanks,,
Bookmarks