Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.2.1
-
None
-
visual studio 2013, Window8.1 64 Bit, Qt5.2.1
Description
If I use QFileDialog::getOpenFileName(this), a dependent DLL will not unload. For example, assume there are two projects:
- Exe Project (Qt project)
- DLL Project, used by the Exe Project (implicitly linked)
If the Exe Project uses the QFileDialog::getOpenFileName() in button click event or other event, the DLL will not unload.
BOOL WINAPI DllMain( _In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved ) { if (fdwReason == DLL_PROCESS_ATTACH) { //Load lib int x = 100; } if (fdwReason == DLL_PROCESS_DETACH) { //UnLoad lib here not call when colse int x = 100; } return TRUE; }
And the DLL global var will not be destroyed.
I've posted this problem in the forums: https://qt-project.org/forums/viewthread/40575/
I've attached a test case.
Thanks in advance.