Have you looked at any of the OpenGL tutorials or examples that come with Qt? If you have working code already, you should be able to copy the example project and modify it by copying your code into the appropriate places in the example.

Any one please take the program and implement it in such a way that it works with qt project for drawing opengl tree.
You mean you want someone to do the job for you? Good luck with that.