for example:

Qt Code:
  1. //Qt dll - H
  2. class DLL_EXPORT ScriptEngine
  3. {
  4. public:
  5. ~DLL() {}
  6. DLL() {}
  7.  
  8. bool SomeFunction(LPCTSTR);
  9.  
  10. };
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. //Qt dll - CPP
  2. DLL::SomeFunction(LPCTSTR cStr);
  3. {
  4. //If this cause any Qt function or initialize Qt class
  5. //in the Win32 application, I get a memory leak!
  6. }
To copy to clipboard, switch view to plain text mode 


Win 32 MFC project:
(All are linked without any problem)
Qt Code:
  1. ...
  2. #include "dll.h"
  3. #pragma comment(lib,"../debug/dll.lib")
  4.  
  5. ....
  6.  
  7. DLL *a;
  8. a = new DLL;
  9.  
  10. a->SomeFunction(...);
  11.  
  12. if (a != NULL)
  13. delete a;
To copy to clipboard, switch view to plain text mode 

After closing the application window output MSVS see:
for example:

Qt Code:
  1. Detected memory leaks!
  2. Dumping objects ->
  3. {186} normal block at 0x007B8750, 24 bytes long.
  4. Data: < > 00 CD CD CD 00 00 00 00 00 00 00 00 00 00 00 00
  5. {185} normal block at 0x007B86A8, 104 bytes long.
  6. Data: < #g` { U2g> F4 B1 23 67 60 86 7B 00 00 00 00 00 E8 55 32 67
  7. {184} normal block at 0x007B8660, 8 bytes long.
  8. Data: < #g { > 00 B2 23 67 A8 86 7B 00
  9. {183} normal block at 0x007B8608, 24 bytes long.
  10. Data: < > 00 CD CD CD 00 00 00 00 00 00 00 00 00 00 00 00
  11. {182} normal block at 0x007B85B0, 24 bytes long.
  12. Data: < > 00 CD CD CD 00 00 00 00 00 00 00 00 00 00 00 00
  13. {181} normal block at 0x007B8538, 56 bytes long.
  14. Data: < ` { > 01 00 00 00 60 86 7B 00 00 CD CD CD 00 00 00 00
  15. Object dump complete.
  16. The program '[4884] Test.exe: Native' has exited with code 0 (0x0).
To copy to clipboard, switch view to plain text mode