PySide Phonon app runs differently after being compiled with py2exe
I have a simple PySide application which plays a video with Phonon.
Everything runs OK in IDLE, but when I make an executable (with py2exe),
and run it, I get the following errors:
QObject: Cannot create children for a parent that is in a different thread.
(Parent is MediaObject(0x3c614b8), parent's thread is QThread(0x44e2ed0),
current
thread is QThread(0x3c6fad0)
One of the things I tried in solving the problem was to manually move the
MediaObject to the QApplication thread with
QObject::moveToThread(QApplication.instance().thread()). This had no
effect, and it turns out that the Media Object thread is already the same
as QApplication's thread. Some app output:
App thread:<PySide.QtCore.QThread object at 0x03C1DF58>
Creating media object...
Media obj thread:<PySide.QtCore.QThread object at 0x03C1DF58>
So my questions are:
Is there a way to let my app behave exactly the same when compiled with
py2exe?
Why does the error say MediaObject's thread is at 0x44e2ed0, when it is at
0x03C1DF58?
No comments:
Post a Comment