In my case I have another strange issue that I still havent been able to 
identify the reason.

My child qglwidget can have animation, fired by a timer, if the user presses a 
button. 
Everything works ok if I only have one instance of the parent widget. 

However, creating 2 instances of the parent widget, and starting the animating 
on both, I will get warnings on the application output: 

QOpenGLBuffer::bind: buffer is not valid in the current context

and the animation of one of the instances freezes and the images get swapped 
between the 2 widgets (that is very strange since all the data that feed the 
animation is exclusive to each object).






Em Sexta-feira, 29 de Novembro de 2013 10:09, Csaba Csernai 
<[email protected]> escreveu:
 
Thanks your tip. I thought about it, but the problem is that many other object 
created that are depending on shaders and also all the configuration, data 
uploading, etc. are handled before the first showEvent occurring.
It is possible to make a workaround, but really it would be a hell of a work. 
That's why I am hoping it will be fixed in the next release maybe, if it's an 
error.

Best regards,
 Csaba Csernai




2013/11/29 joao morgado <[email protected]>

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 
><[email protected]> 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
>[email protected]
>http://lists.qt-project.org/mailman/listinfo/development
>
>
>


-- 
Csaba Csernai
C/C++ Software Developer
Mediso Medical Imaging Systems Ltd.
Hungary, H-1022 Budapest,
Alsótörökvész 14.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to