PDA

View Full Version : Using QT in a Non-QT-App Plugin



AyaKoshigaya
8th July 2010, 14:03
Hi,

I am writing a Plugin for 3ds Max, a programm that's not build with Qt.
I need to use some of the Network-Socket stuff of Qt, but.. to do this I think I need a QApplication Object and the eventLoop.

How do I create the QApplication in a plugin? Sure.. I can do something like:

QApplication app(0, NULL, false); // For no gui mode.

But, the exec() call will always freeze my Plugin, cause I can only call it when a function of my Plugin is called.. and then this function would never exit because it's waiting for the exec().

I could try to place the QApplication in a Thread, but am not sure if this would work and want to ask you first. Doing threads with the WinAPI is nothing I want to do just to "test things" :)

Thanks alot,
Aya