Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.6.0
-
None
-
Mac OS X El Capitan + Xcode 7.1 + Qt 5.6
Description
On OSX 10.11 QWebEngineView has serious performance issues when there is another widget in the layout, for which winId() is called. In my case this function is needed in order to render video, but in general simple call of winId is enough to see what I mean. The following sample demonstrates the issue. At first, the mouse cursor doesn't switch to the splitter icon when you are going to resize it. At second, when the web view or the main window gets resized, it turns black for some time.
#include <QtCore> #include <QtWidgets> #include <QtWebEngineWidgets> int main(int argc, char * argv[]) { QApplication app(argc, argv); QMainWindow mainWindow; QSplitter *spl = new QSplitter(Qt::Vertical); QWidget *widg = new QWidget; // The following line causes terrible blinking when QWebEngineView is resized or loads a url. // Also it prevents the cursor icon from changing when the mouse hovers over the separator. widg->winId(); //QWidget *webView = new QWidget; QWebEngineView *webView = new QWebEngineView; webView->load(QUrl("https://www.qt.io")); spl->addWidget(widg); spl->addWidget(webView); mainWindow.setCentralWidget(spl); mainWindow.resize(800, 600); mainWindow.show(); return app.exec(); }
In a real application with more complex layouts and controls which may change in size (e.g. time or speed labels) it causes terrible blinking.
I suppose, the bug is related to this one, which happens on windows:
https://bugreports.qt.io/browse/QTBUG-52447
In general, winId() causes a lot of problems in Qt5. In Qt4 it worked fine.
Attachments
Issue Links
- duplicates
-
QTBUG-51793 [OS X]: When resizing or causing an update to a window containing a native widget it will flicker to black and black for every update
- Closed
- relates to
-
QTBUG-52447 Transparency issue around winId() and QWebEngineView
- Reported