Hello. In my application I execute a simple sequence of QGIS API functions for create vector layer from postgres database:
QgsDataSourceURI uri = QgsDataSourceURI(); uri.setConnection(ServerIP,port,dbname,username,password); uri.setDataSource(scheme,table,geom,sql); QgsVectorLayer *vlayer = new QgsVectorLayer(uri.uri(),"layername", "postgres"); if(!vlayer->isValid())qDebug(vlayer->lastError()+vlayer->lastErrorTitle()); "isValid()" check failed in application on the one polygon layer but the QGIS opens this layer successful without an error. Both "lastError()" and "lastErrorTitle()" return an empty string... How do to recognize cause of that error? _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
