Important: Please read the Qt Code of Conduct -

How to execute some piece of code in QSGRenderThread?

  • My application is using QtQuick. So rendering happens in QSGRenderThread. I would like to execute some piece of code in QSGRenderThread. I'm receiving some callback in main thread from which I want to execute some gl related initialization code in QSGRenderThread before actual rendering starts. Idea is to do all gl related processing in renderer thread to get valid context from this thread.