I am trying to solve some bugs of an application I havent developed. It had developed with Directx to draw some terrain and model data. But guys combined these features with a qt widget and tried to create its terrain on a widget.
Problem is : if you run the application standalone you can draw models wherever you touch but if you use qt widgets , there is a cursor problem. You touch somewhere it models to another places.

- they canceled widget paintEngine
Qt Code:
  1. QPaintEngine *paintEngine() const { return NULL; }
To copy to clipboard, switch view to plain text mode 

- they setup qtwidget like:
Qt Code:
  1. g_hWnd= (HWND)winId();
  2. SceneManager::getInstance().setupViewer(g_hWnd);
To copy to clipboard, switch view to plain text mode 
If i put 0 to g_hWnd : it works as standalone correctly.

they set up window like :
Qt Code:
  1. setAttribute( Qt::WA_OpaquePaintEvent, true);
  2. setAttribute( Qt::WA_PaintOnScreen, true);
To copy to clipboard, switch view to plain text mode 

I want to understand the reason of problem. Thanks.