Hi All, I'm the author of this thread. Because I didn't receive the confirmation mail using 126.com mailbox, I changed to gmail mailbox.
Seems the ::MessageBox comfused us, ok, forget it please. I found the issue when a destructor of a local static object wasn't called when my first Qt program exiting after calling QMessageBox::warning(). If I didn't called QMessageBox::warning(), the destructor was called normally. I modified the demo program. explain it here. 1. Create a “Qt Application” project (named QtTest) in VS2010 by Qt Add-in with default settings. 2. Add an action, and call QMessageBox::warning() in its slots. 3. Create another DLL project (named MyDll) in VS2010, with a single export function (named foo). class MyObj { public: ~MyObj() { printf("destructor called.\n"); } void test() { printf("test() called\n"); } }; void foo() { static MyObj obj; obj.test(); } 4. Call the exported function “foo()” in QtTest project. QtTest::QtTest(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { ui.setupUi(this); // foo is exported in MyDll.dll, to make sure MyDll.dll is loaded foo(); } 5.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest