Starting a QQmlApplicationEngine from a dll
Unsolved
General and Desktop
-
Hello,
I am using QT (Gui library, QML, etc...) in a dll plugin that is to be used in another software.
My entry point is a user-defined dllMain function.
I start by creating aQApplication
when theDLL_PROCESS_ATTACH
happens, but creating theQQmlApplicationEngine
just after that (like in a static program with a normalmain()
), the program freezes inside the QQmlThread waiting function.Is there a sane way to load the engine and pop a window from a dll?
PS: I don't even call theexec()
function of the Application and trying to follow what was discussed here: https://stackoverflow.com/questions/11054087/starting-qt-gui-from-dll-in-dllstart-function.The code inside the dll attach in the dllMain looks like this:
auto* app = new QApplication(argc, nullptr); Application::RegisterTypes(); auto* engine = new QQmlApplicationEngine; // freezes here in the QQmlThread app->processEvents();
Thanks