[Development] Event loop of Qt window in DLL injected into another process
thiago.macieira at intel.com
Mon Oct 20 01:04:41 CEST 2014
On Sunday 19 October 2014 19:12:29 Arkadiusz Szulakiewicz wrote:
> Hello, I have a problem with event loop. I am creating DLL which I am
> injecting into MFCapplication – my dll spawns a qt window. it works fine,
> except ‘input’ to spawned window is blocked: for ex. i have edit box, i am
> typing into it and nothing happens – unless, I resize / minimalzie window
> then it’s somehow ‘flushed’. does anyone have any idea why this happen?
> Here is my code: http://pastebin.com/iXqnwwCu I am using Qt version
The usual answer is to give Qt the event loop. If you control the host
application, you can create a QAbstractEventDispatcher to make it work with
the MFC application. Or you can use the MFC migration framework (I think it's
only available for enterprise customers).
If you can't do any of those, you should use modal dialogs and use exec() for
your Qt dialog. You'll be able to interact with the Qt dialog only, not the
rest of the application, for the duration of the dialog.
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development