<div dir="ltr">Hi<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 3:58 PM, Denis Rouzaud <span dir="ltr"><<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
I am trying to do a custom application using QGIS libs and I have
trouble to use data providers (i.e. spatialite).<br>
<br>
In my application doing,
QgsProviderRegistry::instance()->pluginList() returns
"
No data provider plugins are available. No vector layers can be
loaded".<br>
<br>
Then of course, trying to create a new db as it is done on
QgsNewSpatialiteLayerDialog is impossible (
QgsProviderRegistry::instance()->library( "spatialite" ); )<br>
and loading layers with <br>
QgsVectorLayer* vl = new QgsVectorLayer(
"dbname='path_to_sqlite_file' table='mytable'' (geometry) sql=",
"layername", "spatialite" );<br>
fails.<br>
<br>
I believe I am missing something fundamental here, but I have no
idea what.<br>
<br>
If anybody has a lead, thanks a lot.<br></div></blockquote><div><br></div><div>Did you ensure the QGIS_PREFIX_PATH is set and call initQgis? See [1] for an example.</div><div><br></div><div>[1] <a href="https://github.com/AIFDR/inasafe/blob/master/safe/common/testing.py#L692">https://github.com/AIFDR/inasafe/blob/master/safe/common/testing.py#L692</a> </div>
<div><br></div><div><br></div><div>Regards</div><div><br></div><div>Tim</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<br>
Cheers,<br>
<br>
Denis<br>
<br>
</div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Tim Sutton - QGIS Project Steering Committee Member<br>
==============================================<br>Please do not email me off-list with technical<br>support questions. Using the lists will gain<br>more exposure for your issues and the knowledge<br>surrounding your issue will be shared with all.<br>
<br>Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>==============================================</div>
</div></div>