wayland 下opengl窗口 崩溃问题

前置条件:
qputenv("QT_WAYLAND_SHELL_INTEGRATION", "kwayland-shell");
QSurfaceFormat format;

format.setRenderableType(QSurfaceFormat::OpenGLES);
format.setDefaultFormat(format);

崩溃条件:
  对opengl窗口及其父窗口调用setWindowFlags(),hide()/show()这两种情况会导致崩溃问题。
coredump:

解决办法:
在调用setWindowFlags(),hide()/show()之前调用 QOpenGLWidget窗口的makeCurrent方法。
原文地址:https://www.cnblogs.com/gladiatorplus/p/13814962.html