Don't really have an idea on the crash, but you should not be using QGLWidget if you are on Qt5.

Use QOpenGLWidget instead.

Cheers,
_