Hi i have a bit of a problem. I want to use opengl in my program. I've added

Qt Code:
  1. CONFIG += qt thread warn_off debug_and_release build_all
  2. QT += qt3support opengl
To copy to clipboard, switch view to plain text mode 

to my .pro file. And i create a simple class derived from QGLWidget

Qt Code:
  1. #include <QGLWidget>
  2.  
  3.  
  4. class MyOpenGL : public QGLWidget
  5. {
  6. Q_OBJECT
  7. public:
  8. MyOpenGL(QWidget *parent = 0, QGLWidget *shareWidget = 0);
  9. ~MyOpenGL(void);
  10.  
  11. protected:
  12. void paintEvent(QPaintEvent *event);
  13. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #include "MyOpenGL.h"
  2. #include <QtGui>
  3. #include <QtOpenGL>
  4.  
  5. MyOpenGL::MyOpenGL(QWidget *parent, QGLWidget *shareWidget)
  6. : QGLWidget(parent, shareWidget)
  7. {
  8. setFixedSize(200, 200);
  9. setAutoFillBackground(false);
  10. }
  11.  
  12. MyOpenGL::~MyOpenGL(void)
  13. {
  14. }
  15.  
  16. void MyOpenGL::paintEvent(QPaintEvent *event)
  17. {
  18. }
To copy to clipboard, switch view to plain text mode 

Nothing fancy. Now everything works fine in debug mode. However when i switch to release mode, the project compiles and runs to the point where i try to instantiate MyOpenGL class. At that point program crashes with the message from Qt:

"Cannot mix incompatible Qt libraries"

I have only Qt4.3.3 installed on my machine and i develop in msvc2008 on WinXP SP3. I'm quite puzzled by this. Since it runs fine in debug and crashed in release would suggest that there is something fishy with the project setup, but i can't find anything wrong with it. Everything looks ok.

I'll appreciate any thoughts on what could be the cause of this problem.