[Qgis-user] Open a .Qgs project file in API, why maps do not show?

Spartucus niubob at hotmail.com
Sun Oct 19 20:11:40 PDT 2014


Hi all,
I'm using QGIS-2.4.0 API. I saved a test.qgs file in QGIS Desktop, in this
project, there is one layer in it.

Then I open the test.qgs project file in QGIS API to developing, but it is
not showed in APP. 

Why is that?
The code I'm using to open the project is:
    QString myProjectPath = "E:\\QGIS\\Pro\\test.qgs";
    Qgsproject::instance()->setFileName(myProjectPath);
    bool isRead = QgsProject::instance()->read();

In Debug mode, isRead equals TRUE.

Any advice would be appreciated!



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Open-a-Qgs-project-file-in-API-why-maps-do-not-show-tp5168318.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.



More information about the Qgis-user mailing list