I suggest a good C++ book.
Are you using Qt3 or Qt4?
The hellogl example uses QGLWidget like you are. But it shows you how to use the QGLWidget constructor. It doesn't matter if you split your program in different parts.
C++ contains several ways to exchange information between different objects or different classes.
Bookmarks