Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I spent a good chunk of my day today fighting a bug that I imagine is going to bite us sooner or later at work, but so far seems limited to my machine.

We use Qt5 and QGraphicsScene with QGLWidget to let us also do custom background painting in OpenGL. We have tried porting to the new QOpenGLWidget before, but we hit a fun issue: If you add a QWebEngineView to a widget in the graphics scene, the entire widget disappears for a frame every time the browser repaints. Which gives you a really great flickering that makes the software unusable.

It used to only happen on my branch with QOpenGLWidget, but I recently recompiled using a newer gcc version and now it happens to me with the old QGLWidget as well.

Qt and OpenGL seem to not get along all that great. There are all sorts of odd rendering artifacts that pop up and never seem to get fixed. The documentation for internal Qt code is also not great, which makes trying to parse through it a real adventure.

Edit: Another fun bug that popped up in the Qt4 to Qt5 transition is that on Linux if you have our app open and then switch to a different virtual workspace and back, the app stops repainting until you resize the window.



Try to QOpenGLwindow. There's a function to wrap it up in a container Qwidget so it can be embedded like a QWidwget in the UI.


Currently there is the QGLWindow that holds a QGraphicsScene, where all of our windows are QWidgets wrapped by QGraphicsProxyWidget to get them into the scene.

Are you suggesting that we should do another layer of wrapping the QWebEngineView in a QOpenGLWindow wrapped in a QWidget that is then wrapped in a QGraphicsProxyWidget?

I don't understand why that would help, but I guess you never know.


Years ago, I managed to track down one of the core Qt maintainers at a conference to ask about my use of QGraphicsProxyWidget on a QGLWidget. He winced at the mere mention of QGraphicsProxyWidget...


I've seen something like this before and it was related to my video driver (nouveau, I think).


I'm using nouveau so that could be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: