Show/hide of window containing QGLWidget fails on remote X server
-
I have a window (QMainWindow or QDialog) with a QGLWidget. If I call hide() and then show() on the window I will get the following error when running in an X windows system (remote: linux server, mac client):
X Error: GLXBadContext 147
Extension: 146 (Uknown extension)
Minor opcode: 5 (Unknown request)
Resource id: 0xa0001c(and nothing is rendered)
Any ideas what could cause this behavior?
-
I've got same problem in the same environment (local Mac, remote - Linux box).
What I do is I am creating a QDeclarativeView (actually QApplicationViewer that QtCreator's wizard constructs) and use QGLWidget as a viewport in the following manner:
@QmlApplicationViewer viewer;
...
viewer.setViewport(new QGLWidget);
...
viewer.setResizeMode(QDeclarativeView::SizeRootObjectToView);
...
viewer.setFrameStyle(0);
viewer.setAttribute(Qt::WA_OpaquePaintEvent);
viewer.setAttribute(Qt::WA_NoSystemBackground);
viewer.setAttribute(Qt::WA_DeleteOnClose);
viewer.setStyleSheet("background: transparent; border: none");
viewer.setWindowFlags(Qt::FramelessWindowHint);
viewer.setMainQmlFile(QLatin1String("qml/twclientqml/TwClient.qml"));
viewer.showFullScreen();@What could this message actually mean? OpenGL initialization failed and system falls back to raster?