Hello,
I've done an application that uses Qt Mobility, precisely only the Qt Location module. All works fine until i reached the "release" step: i successfully prepare my application bundle with macdeployqt tool, checked, with otool' that every dynamic library and framework is in the right place and be sure that the application (the plugins, and the libraries) are no longer linked against the Qt development libraries installed on my mac... all was perfect. When i tried to launch the application, it failed runtime when this code is being executed:
serviceProvider = new QGeoServiceProvider("nokia");
mapGraphics = new QGraphicsGeoMap(serviceProvider->mappingManager(), this);
mapGraphics->setMapType(QGraphicsGeoMap::StreetMap);
mapGraphics->setConnectivityMode(QGraphicsGeoMap::HybridMode);
serviceProvider = new QGeoServiceProvider("nokia");
mapGraphics = new QGraphicsGeoMap(serviceProvider->mappingManager(), this);
mapGraphics->setMapType(QGraphicsGeoMap::StreetMap);
mapGraphics->setConnectivityMode(QGraphicsGeoMap::HybridMode);
To copy to clipboard, switch view to plain text mode
The code shows that the plugin GeoService must be loaded (the plugin lays in PlugIns directory inside the bundle, and all its dependencies are statisfied). When the application tries to load the plugin, I don't know why, is loaded the Qt development library (/my/qt/path/plugins/geoservices) instead of the bundle one (/my/qt.app/Contents/PlugIns/geoservices) and this causes the application to crash.
Here are some workarounds that failed:
- qt.conf, produced by macdeployqt is:
[Paths]
Plugins = PlugIns
[Paths]
Plugins = PlugIns
To copy to clipboard, switch view to plain text mode
- Runtime, i try to add the right plugin path on QtApplication::librariesPath with addLibrary, but doesn't work
Thanks in advance,
Ciao,
Marco
Bookmarks