The Qglwidget form class in Qt is not included in the Glut tool library, no wonder the solid ball body is drawn in Myglwidget (a derived class that is qglwidget in my program) is said to be "Glutsolidsphere": identifier not found, That means there is no declaration of this function. The next step is to install the GLUT library:
1. Download the GLUT library Http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip first.
2. Unzip the downloaded files and move the Glut32.lib and Glut.lib two lib files to the./lib folder in the QT directory.
3. Move the Glut.dll and glut32.dll two dynamic link libraries to C:\windows\system32.
4. Move the glut.h file to \include\qtopengl in the QT directory and create the glut file (no suffix) so that the glut is installed and switched to its own program, Add "#include <glut>" to MyGLWidget.cpp (CPP for qglwidget derived classes) so that you can use the functions in glut.
Use of GLUT Library in Qt under Windows platform