Hello forum,

I am trying to convert WxWidget application to the Qt application and i have to set some attributes to the particular QGLWidget subclass.

The attributes that need to be set are as follows:

Qt Code:
  1. QGLFormat glformat;
  2.  
  3. attributeList[0] = QGL::Rgba;
  4. attributeList[1] = QGL::DoubleBuffer;
  5. attributeList[2] = glformat.depthBufferSize();
  6. attributeList[3] = 24;
  7. attributeList[4] = glformat.stencilBufferSize();
  8. attributeList[5] = 8;
  9.  
  10. if(stereo_mode == RenderMode::QUAD_BUFFERED_STEREO)
  11. {
  12. attributeList[6] = QGL::StereoBuffers;
  13. }
  14.  
  15. attributeList[7] = 0;
To copy to clipboard, switch view to plain text mode 

In the WxWidget they are sending the whole array to wxGLCanvas constructor and i do not see any provision to do the same here in Qt.

Even inside the constructor i can have them as an array and then i am not sure what to do.

Any better idea to deal with this issue?


Regards
Sajjad