<DIV>I used 1.8.o version, when I add *.qgs file, the result is 'true', but the layercount is 0. The detail code is like this: </DIV>
<DIV> </DIV>
<DIV> QString fullPath1="D:/ProgramTest/vMap/data/newProject.qgs";<BR> mpMapCanvas->freeze( true );<BR> QgsMapLayerRegistry::instance()->removeAllMapLayers();<BR> QgsProject::instance()->setFileName( fullPath1 );<BR> bool result=QgsProject::instance()->read();<BR> mpMapCanvas->freeze( false );<BR> mpMapCanvas->refresh();<BR> int t=mpMapCanvas->layerCount();<BR> QList<QgsMapLayer*>layers=mpMapCanvas->layers();</DIV>
<DIV> </DIV>
<DIV>I don't know what's wrong with it.</DIV>