I have a aplication that draws 2D and 3D graphs with QGLWidget. It works good on windows and linux, but the 3D graphs fail on Mac (just bought myself a Macbook ). 2D works good but in 3D appears a blank window with nothing draw.
There is one major difference between graphs 2D and 3D, the 2D graph class is derived from QGLWidget, and the 3D class, however, is derived from a base class wich is derived from QGLWidget


graph 2D
Qt Code:
  1. class GLGraph : public QGLWidget
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. GLGraph();
  7. ~GLGraph();
  8. .....
To copy to clipboard, switch view to plain text mode 

graph 3D

Qt Code:
  1. #include "graph3d_base_glwidget.h"
  2.  
  3. class GLGraph3D_fxy : public Graph3D_Base_GLWidget
  4. {
  5. Q_OBJECT
  6.  
  7. public:
  8.  
  9. GLGraph3D_fxy();
  10. ~GLGraph3D_fxy();
  11.  
  12. virtual void paintGL();
  13. ...
To copy to clipboard, switch view to plain text mode 

3D graph base class
Qt Code:
  1. #include <QGLWidget>
  2. #include "graph3Dclass/graph3d.h"
  3. #include "gui/graf3d_dlg.h"
  4. ....
  5.  
  6. class Graph3D_Base_GLWidget : public QGLWidget
  7. {
  8. Q_OBJECT
  9.  
  10. public:
  11. Graph3D_Base_GLWidget();
  12. ~Graph3D_Base_GLWidget();
  13.  
  14. virtual void initializeGL();
  15. virtual void paintGL()
  16. .....
  17.  
  18. virtual void resizeGL(int width, int height);
  19.  
  20. void AutoRotate();
  21. .......
To copy to clipboard, switch view to plain text mode 

Also I I've been checking QGLWidget in Qt Assistant documentation and I didn't understand the constructor
Qt Code:
  1. class MyGLDrawer : public QGLWidget
  2. {
  3. Q_OBJECT // must include this if you use Qt signals/slots
  4.  
  5. public:
  6. MyGLDrawer(QWidget *parent) //????
  7. : QGLWidget(parent) {} //???????
  8.  
  9. protected:
  10.  
  11. void initializeGL()
  12. {
  13. // Set up the rendering context, define display lists etc.:
  14. ...
To copy to clipboard, switch view to plain text mode 

Any ideias on this 3D blank window?