<div dir="ltr">Solved it.<div>It seems we have to initialize QgsProviderRegistry with valid plugin directory path.</div><div><br></div><div><div>    QString myPluginsDir        = "/usr/lib/qgis/plugins";</div><div>    QgsProviderRegistry::instance(myPluginsDir);</div></div><div><br></div><div>Still can't see the raster but at least I passed the "isValid" problem.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-03 18:34 GMT+02:00 Matthias Ludwig <span dir="ltr"><<a href="mailto:kaotika@gmx.de" target="_blank">kaotika@gmx.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px"><div>I'am have no experiences with writin C++ apps but on the python side you have to set the prefix paths and init qgis at app start. Otherwise you'll get strange errors, like yours.</div>

<div> </div>

<div>QgsApplication.prefixPath() --> get your path from a working QGIS python console</div>

<div> </div>

<div>QgsApplication.setPrefixPath(<path>, True)<br>
QgsApplication.initQgis()</div>

<div> </div>

<div>Hope this helps.</div>

<div> </div>

<div> </div></div></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></div>