setDepth(true) enables the *depth buffer* in the context and does nothing for depth testing.
try add glDepthFunc(GL_LEQUAL); somewhere in your initialization.
also, the QGLFormat need to be setup before you create the context, and then sent in to the constructor as the second parameter.
Bookmarks