diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2017-07-20 15:21:07 +0200 |
---|---|---|
committer | Viktor Engelmann <viktor.engelmann@qt.io> | 2017-08-02 07:29:31 +0000 |
commit | 3fdcc80a11bb5320e85cf37e0bfd89cce01e296b (patch) | |
tree | 49cc54d2d21f2f31d52a3ade2728e7a17f70ba78 | |
parent | a2feb3c4610111ad86efa197f8711ee902891d3f (diff) | |
download | qtwebengine-3fdcc80a11bb5320e85cf37e0bfd89cce01e296b.tar.gz |
Fix viewport information in simplebrowser
Resize QWebEngineView explicitly as a workaround for background tabs.
Task-number: QTBUG-61770
Change-Id: Iaa792cb01788c9c33b6992a08a05b0cf11d0579d
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io>
-rw-r--r-- | examples/webenginewidgets/simplebrowser/tabwidget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.cpp b/examples/webenginewidgets/simplebrowser/tabwidget.cpp index a7f855c2a..33c3ac1dc 100644 --- a/examples/webenginewidgets/simplebrowser/tabwidget.cpp +++ b/examples/webenginewidgets/simplebrowser/tabwidget.cpp @@ -204,8 +204,13 @@ WebView *TabWidget::createTab(bool makeCurrent) webView->setPage(webPage); setupView(webView); addTab(webView, tr("(Untitled)")); - if (makeCurrent) + if (makeCurrent) { setCurrentWidget(webView); + } else { + // Workaround for QTBUG-61770 + webView->resize(currentWidget()->size()); + webView->show(); + } return webView; } |