Does your child need to really be MDI? If yes, use the QWorkspace as place holder for other windows. If not give the widget the Qt::WType_TopLevel flag (as well as other needed flags).
A QGLWidget is a widget as others, as it inherits QWidget and can be used in a QWorkspace as a child window.
Never patch not working code. Rewrite it !
Never patch badly designed classes. Recreate them cleanly.
(Excerpts from Computing Bible)