[Qgis-developer] Tracing errors of the vector layer creation

Eye OnNet eyeonnet2001 at yahoo.com
Sun Apr 24 12:34:16 EDT 2011


In my application I execute a simple sequence of QGIS API functions for create vector layer from postgres database:

  QgsDataSourceURI uri = QgsDataSourceURI();
  QgsVectorLayer *vlayer = new QgsVectorLayer(uri.uri(),"layername", "postgres");

"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?

More information about the Qgis-developer mailing list