Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.4.0 Alpha
-
None
-
X11 (composite disabled), Linux, Debian unstable, self-compiled Qt5.4 release branch
Description
Consider a QMainWindow, that has a QStackedWidget as child, which has a QWebEngineView as child.
This works perfectly fine, until you call winId() on the QStackedWidget. Then the QWebEngineView renders nothing. The same can be observed when creating a separate QWidget and make it native; various attempt to get it to work by containing the QWebEngineView or the native widget in other widgets (native or not) failed. It also fails when creating a QGLWidget as a direct or indirect sibling.
Usually, Qt will print this message once or twice to the terminal when this happens: "QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined"
Setting QT_USE_NATIVE_WINDOWS=1 when starting the program makes it work slightly better. The window isn't black anymore most of the time, but it can turn black temporarily, and might flicker or not repaint. (Still unusable.)
I'm assuming this is a bug. I didn't test on windows or OSX, although there's an unreliable report that it might work on OSX.
I have no minimal test case. If one is absolutely needed, please say so and I can write one. Though I assume that it doesn't need much to reproduce.
Attachments
Issue Links
- duplicates
-
QTBUG-40765 QQuickWidget::winId() breaks rendering
- Closed
- relates to
-
QTBUG-40765 QQuickWidget::winId() breaks rendering
- Closed
-
QTBUG-48130 Calling winId() on a widget breaks QOpenGLWidget/QQuickWidget/QWebEngineView in the same TLW
- Closed