PDA

View Full Version : Directx - paint mouse track problem



qtplus
7th July 2017, 16:55
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


QPaintEngine *paintEngine() const { return NULL; }


- they setup qtwidget like:


g_hWnd= (HWND)winId();
SceneManager::getInstance().setupViewer(g_hWnd);

If i put 0 to g_hWnd : it works as standalone correctly.

they set up window like :


setAttribute( Qt::WA_OpaquePaintEvent, true);
setAttribute( Qt::WA_PaintOnScreen, true);


I want to understand the reason of problem. Thanks.