开发者

Where to store Qt imports for OSX deployment?

I’m making my QT-application ready for shippin开发者_运维问答g. I’ve got one import -> QtDesktop.

I put it under Contents/imports (the dylib is under Contents/imports/QtDesktop/plugin).

Then I fixed its dependencies with install_name_tool -id & -change.

Upon starting the application it keeps saying “module “QtDesktop” is not installed”

What could be wrong?


Check out this excellent link from Nokias Qt Documentation. They describe the steps you mention with install_name_tool. But they recommend putting plugins in a sligtly diffrent folder.

Plugins can be put in the Contents/PlugIns section of a bundle. An advantage of using this location is that the plugins will show up in Finder and users can enable and disable them easily. For a Qt program to take advantage of this feature, we must add this call to main():

qApp->setLibraryPath(qApp->applicationDirPath() + "/../PlugIns");

Also check out the clever macdeployqt script - It will do everything automatically for you. I've used it successfully on an application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜