Bump. I'd love to hear an update for this as well. I used the same example (new link here: https://doc-snapshots.qt.io/4.8/demo...-main-cpp.html) only I'm trying to make it work with QOpenGLWidget since QGLWidget is deprecated and have the same error showing up. I'm just trying to get the example to work at this point for a proof of concept that rendering can be done on a separate thread while still using a QPainter.
UPDATE: My own test is a much simplified version of the original. I am just trying to render a QImage, since we'll be rendering video. So basically, from the original example in question:
- I've changed QGLWidget to QOpenGLWidget
- Used UI file vs MDI Window since our app works that way
- Separated classes for my own clarity
- Removed all the extra GLPainter stuff and simply use drawImage with a QImage
Like the original, I get the error, but if I press ignore I still see my image rendered.
Attaching my own project.
ThreadTest.zip
Bookmarks