QOpenGLWidget black screen as a newly created class
Unsolved
General and Desktop
-
I got a black screen when creating a QOpenGLWidget from a QWidget in 5.14, and the code like this:
widget.cpp:QOpenGLWidget *game = new QOpenGLWidget(); game->show();
But that openglwidget is really rendered and running normally if it's an independent application.
This happened when i integrate it into another application by directly copy all files.
I know QOpenGLWidget's function may fail when used as child thread, so should i integrate it into subdir project and launch it from other project or is there any other method to make it render again?