[Qgis-developer] Open a *.qgs project file in API,	why maps do not show?
    Tendfly niu 
    niubob at hotmail.com
       
    Mon Oct 20 19:10:25 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!
 
Regards,
 
Bob
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20141021/ff131aaa/attachment.html>
    
    
More information about the Qgis-developer
mailing list