[Qt-interest] Qt, DirectX and MultiThreading

Clinton Stimpson clinton at elemtech.com
Thu Apr 15 16:02:15 CEST 2010


On 04/15/2010 01:30 AM, Ender EREL wrote:
> Hello everyone,
>
> Yeah, i know, i am walking in very dangerous, murky waters here so if
> you want, you can close this message now. But if you like challenges,
> stay tuned in for a bucket-load of fun!
>
> I am developing on Win7 using Qt 4.5.3&  MSVC2008.
>
> We have a 3D Engine that uses DirectX and i am given the task of
> integrating this with Qt. My aim is to enable DirectX rendering on a
> QWidget surface. I completed this successfully by giving the HWND of my
> widget to the engine where my colleagues take over. Victory!
>
> Everything was going perfectly, until i opened a modal dialog
> (QFileDialog to be exact), which stops the execution of Qt's Event Loop,
> which manages QTimers including the most important QTimer for me: the
> QTimer (a zero-timer) that triggers the DirectX rendering. I facepalm'd.
>    

Why use a timer for that?  Can't you overload QWidget::paintEvent and 
trigger DirectX rendering then?
That simpler approach works when using external OpenGL engines on a QWidget.

Clint




More information about the Qt-interest-old mailing list