QtWinMigrate not working with Qt5
I am having trouble upgrading a Qt GUI DLL to Qt5.3 from Qt4.8. We are using QtWinMigrate to load the DLL from a Win32 application. We are unable to change the Win32 app. The problem we are seeing is the same that is mentioned in this thread:
i.e. that all the GUI elements are completely unresponsive, e.g. buttons can't be clicked.
The issue is taken up by the author of this thread in this bug report:
The bug was marked as closed because the author believed it was fixed. This is not the case as in another thread here:
the author mentions he had a local work around in place when he stated that it was fixed.
The issue seems to be that
is not called, but the base class
QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
which doesn't send windows events. It's called from qt_internal_proc in qeventdispatcher_win.cpp.
The pointer to the dispatcher is a static cast from a GetWindowLongPtr, so as far as I can see it will always call the base class.
It can sort of be made to work by hacking QtFilterProc in qmfcapp.cpp to add the line
but it is slow and some bits. e.g. combo boxes, still do not work.
So are there any ideas how to go about fixing this? Or are there any workarounds? The architecture of the controlling application means we can't start an event loop in another thread, though this could be a workaround in other cases.
Hi and welcome to devnet,
You have there a good and interesting analysis, however the forum might not be the best place for such a low-level question. You should rather try to write to the development mailing list to discuss the implementation used by the original author since he seemed to have successfully implemented what you are trying to do.