CodePudding user response:
QOpenGLWidget can only work in the main thread, the thread can be used to process the data, and send the results through the signal channel to the main threadCodePudding user response:
I have multiple QOpenGLWidget controls the main thread of the need to show the update at the same time, the main thread to deal with other things, so I'd like to open a thread to render,CodePudding user response:
GUI thread and worker threadAs mentioned above, each program has a thread on startup, the thread is called "the main thread" (in Qt applications, also known as "GUI thread"), Qt GUI must run in this thread, all widgets and several related classes, such as QPixmap, cannot work in a worker thread, auxiliary thread is often referred to as "worker thread", because it is used to share the work from the main thread,