PDA

View Full Version : QObject::moveToThread warning



mnemonic_fx
10th August 2007, 14:24
Dear All,

I've experienced a problem when I link the Mac OS X application to Qt as frameworks.
I followed the documentation "Deploying an Application on Qt/Mac".

After I link it, this qWarning comes out :

QObject::moveToThread: Current thread (0x5e23a50) is not the object's thread (0x5e072f0).
Cannot move to target thread (0x5e072f0)

I'm not sure which object (obviously lives in main thread) that is moved to which thread.
Since I'm not experiencing this, before I link the application to Qt, and copy necessary resources.
But I assume it's a QtGui object, because it came out once a QMainWindow object / QDialog is created.

I suspect this is related to the use of plugins (.mng), and the use of resources like sound (.wav) and text (.txt),

I put the resources on "Myapp.app/Contents/Resources", and I use QString manipulation with QCoreApplication::applicationDirPath() to refer to that path, so I could load the text, sound (by QSound), or .mng (by QMovie) through appropriate Qt Class.

What seems to be wrong ?

mnemonic_fx
10th August 2007, 14:32
Sorry for repost, I think I post the previous message on the wrong thread.

Dear All,

I've experienced a problem when I link the Mac OS X application to Qt as frameworks.
I followed the documentation "Deploying an Application on Qt/Mac".

After I link it, this qWarning comes out :

QObject::moveToThread: Current thread (0x5e23a50) is not the object's thread (0x5e072f0).
Cannot move to target thread (0x5e072f0)

I'm not sure which object (obviously lives in main thread) that is moved to which thread.
Since I'm not experiencing this, before I link the application to Qt, and copy necessary resources.
But I assume it's a QtGui object, because it came out once a QMainWindow object / QDialog is created.

I suspect this is related to the use of plugins (.mng), and the use of resources like sound (.wav) and text (.txt),

I put the resources on "Myapp.app/Contents/Resources", and I use QString manipulation with QCoreApplication::applicationDirPath() to refer to that path, so I could load the text, sound (by QSound), or .mng (by QMovie) through appropriate Qt Class.

What seems to be wrong ?

marcel
10th August 2007, 14:38
See this thread: http://www.qtcentre.org/forum/f-qt-programming-2/t-cannot-move-to-target-thread-8219.html/?highlight=moveToThread

The last post.

Regards

jacek
10th August 2007, 23:11
Sorry for repost, I think I post the previous message on the wrong thread.
Next time, please, wait for a moderator to move the thread instead.