Thank you very much! This still does not work.

It is like that, if I donot use QFrame in ui file as the parent of my QGLWidget, but use the splitter as the parent, it then works. But I need to get the location of the QGLWidget in the overall window and have to use QFrame. Any more ideas? Thank you very much!