reportCreator->dynamicCall("CreateWordDocument(const QString&, const QString&)", "c:/test.doc", "c:/test.xml");
class TestThread : public QThread{public: TestThread(QObject *parent = 0); ~TestThread();protected: void run();private: QAxObject* reportCreator;};TestThread::TestThread(QObject *parent):QThread(parent){ reportCreator = new QAxObject("{98C51056-5414-46E9-8FAD-E59099AFFF25}");}TestThread::~TestThread(){ delete reportCreator;};void TestThread::run(){ reportCreator->dynamicCall("CreateWordDocument(const QString&, const QString&)", "c:/test.doc", "c:/test.xml");}
m_thread.start();
t= new QTimer(this);connect(t, SIGNAL(timeout()), CMyWidget, SLOT(update()));t.start(50);reportCreator->dynamicCall(...)
void TestThread::run(){ QTimer timer; timer.setInterval(50); connect(&timer, SIGNAL(timeout()), m_widget, SLOT(update()), Qt::DirectConnection); timer.start(); exec(); }