Dear all,

I am using Qt-4.6.2 in my application.
I have created a class(ImgMatchTex) inherited from QGLWidget.
Now when I am using QCursor::setPos(int, int) function to set the cursor position.
But after using it, it is giving a problem while resizing the window.
I am not able to increase the height of the window. Event->size().height() remains to constant(zero) even if I try to increase the window height,
and this is due to QCursor::setPos(int, int) function. When I comment this line , it works fine.
Could anyone know reason behind such a abnormal behaviour.

Qt Code:
  1. void ImgMatchTex::resizeEvent (QResizeEvent *Event) // Derived form QGLWidget.
  2.  
  3. {
  4.  
  5. makeOverlayCurrent();
  6. resizeOverlayGL (Event->size().width(), Event->size().height() );
  7.  
  8. makeCurrent();
  9. resizeGL (Event->size().width(), Event->size().height() );
  10.  
  11. QPoint GWinCent = mapToGlobal (QPoint(width()/2, height()/2));
  12. QCursor::setPos (GWinCent.x(), GWinCent.y());
  13.  
  14. }
To copy to clipboard, switch view to plain text mode