[Qt-interest] Problem with QGLWidget
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Wed May 20 08:56:47 CEST 2009
shariff wrote on Wednesday, May 20, 2009 8:44 AM:
> ...
> class GLWidget : public QGLWidget
> {
> public:
>
> GLWidget(QGLContext *con);
> ~GLWidget();
> }
>
> GLWidget::GLWidget(QGLContext *cont)
> {
> cont->create(); //=====> At this point Iam getting segmentation
> fault }
Probably you should pass in a QGLContext which has already been created by the caller of your c'tor? And why not let the QGLWidget create the QGLContext for you, by using instead:
http://doc.trolltech.com/4.5/qglwidget.html#QGLWidget-3
With that c'tor you can still customise the QGLContext, by passing in the proper QGLFormat.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list