Hi,

I'm using the WGLWidget under windows 7 64 bits and when I call "wglGetCurrentDC" from the "resizeEvent" I got another value than from the "paintEvent" !
Also, I have checked and it is the same thread !

How is it possible ?

Here is some code :

Qt Code:
  1. void GLViewport::resizeEvent(QResizeEvent* e)
  2. {
  3. if (_isInitialized)
  4. return;
  5.  
  6. glInit();
  7.  
  8. _win32HDC = wglGetCurrentDC();
  9. }
  10.  
  11. void GLViewport::paintEvent(QPaintEvent *)
  12. {
  13. _win32HDC = wglGetCurrentDC();
  14. }
To copy to clipboard, switch view to plain text mode