PyQT アプリケーションで jpeg サポートを有効にするには、手動でqjpeg4.dll
.
dll と pyd ファイルが最終的な exe にバンドルされていない場合は正常に動作します。たとえば、py2exe を使用すると、次のことができます。
DATA=[('imageformats',['C:\\Python26/Lib/site-packages/PyQt4/plugins/imageformats/qjpeg4.dll'])]
setup(console=[{"script":"cycotic.py"}],
data_files = DATA,
options={"py2exe":{
"includes":["sip"],
"excludes":MODULE_EXCLUDES,
"bundle_files":3,
"compressed":False,
"xref":True}},
zipfile=None)
ただし、同じことを行い、dll を exe にバンドルすると (を使用して"bundle_files":1
)、次のメッセージで失敗します。
QObject::moveToThread: Current thread (0x3a16608) is not the object's thread (0x
2dddaf8).
Cannot move to target thread (0x2dddaf8)
QObject::moveToThread: Current thread (0x3a16608) is not the object's thread (0x
2dddaf8).
Cannot move to target thread (0x2dddaf8)
QObject::moveToThread: Current thread (0x3a16608) is not the object's thread (0x
2dddaf8).
Cannot move to target thread (0x2dddaf8)
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPixmap::scaled: Pixmap is a null pixmap
アプリケーションを適切にバンドルするにはどうすればよいですか?