PDA

View Full Version : When QDockWidget with QWebEngineView is undocked, other docked widgets don't respond



sammyy
20th December 2017, 17:43
I have multiple dockwidgets in my main window and everything works fine until I add a dockedwidget with QwebEngineView as the widget.

When a dockwidget with QwebEngineView as a child is undocked, user inputs such as scroll bars in the other docked widgets are ignored. When the dockwidget with QWebEngineView is docked, it works fine.

The code I am testing with is the example project in ..\Qt 5.6\widgets\mainwindows\dockwidgets with minor modification to add one more dockedwidget with QWebEngineView (see below).

///// added this in void MainWindow::createDockWindows()

WebView* w_view = new WebView(nullptr);
dock = new QDockWidget(tr("WebView"), this);
dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
dock->setWidget(w_view);
addDockWidget(Qt::LeftDockWidgetArea, dock);


/// the widget with QWebEngineView
class WebView : public QWidget {
Q_OBJECT
public:
WebView(QWidget* parent = 0)
:QWidget(parent)
{
setObjectName("WebView");
m_webEngineView = new QWebEngineView(this);
m_webEngineView->load(QUrl("http://qt-project.org/"));
}

~WebView() {}
private:
QWebEngineView* m_webEngineView;
};
///////////////////////////

PS: This works fine when using Qt 5.5, issue appears on versions >= 5.6 .