[Development] QGLWidget creation with non-visible parent

joao morgado joaodeusmorgado at yahoo.com
Fri Nov 29 10:54:16 CET 2013


Hi 

I had the same similar issue, I was using a parent widget, with buttons and a frame with a child qglwidget derived class.
What I did was to create a method in the child qglwidget derived class to initialize the shaders, and I only calls this method inside the showEvent() of the parent widget class.

Regards
Joao de Deus




Em Sexta-feira, 29 de Novembro de 2013 6:58, Csaba Csernai <csernai.csaba at gmail.com> escreveu:
 
Hi everyone!

I would like to ask your help in some Qt 5 matter. I think it's somewhat related to QTBUG-31451, but not sure.

When I create a QGLWidget with a parent which not yet visible, then it seems to fail to compile shaders although QGLContext is valid( at least the isValid function returns true).

e.g.: there is a tab widget, which is visible, and from code we add another tab, so that it contains a QWidget and inside the QWidget, there is a QGLWidget( yeah, i kno w it's messed up, but that's it). So when we create the QGLWidget with the QWidget parent, the QWidget is not visible, and - as far as i discovered - it has no window handle.

It worked fine, in 4.8, and i compile with msvc 11.0.


My question is that is it a bug or did I miss something? Would someone point me in the right direction?Should i post my findings to the mentioned bug thread or create a new one?


Thanks. 

Bye,


-- 
Csaba Csernai
C/C++ Software Developer
Mediso Medical Imaging Systems Ltd.
Hungary, H-1022 Budapest,
Alsótörökvész 14.

_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20131129/220aca6b/attachment.html>


More information about the Development mailing list