Hi,
Sorry I can't help you out. When I had this issue I really tried everything I could and nothing worked out. The only thing that fixed the problem was not setting the ogl version, I was using windows but my co worker used osx and worked too. If I didn't type any glFormat.setVersion it would draw everything, and if i query the current version in a breakpoint or print would give my current graphic ogl version. Are you sure that your graphic card support that ogl version? (for instance if you have 2 graphic cards, your app might be using yout intel hd with ogl 2.1 support only) Have you tried new qt graphic classes ( i dunno how it turned out but when qt5 was released there was some new graphic classes i didnt explore, they might work better)?
good luck on solving this issue