proj=QgsProject.instance()# 存储值proj.writeEntry("myplugin","mytext","hello world")proj.writeEntry("myplugin","myint",10)proj.writeEntry("myplugin","mydouble",0.01)proj.writeEntry("myplugin","mybool",True)# 读取值(返回具有值的元组,和一个布尔状态,检索到的值是否可以转换到它的类型, string, an integer, a double and a boolean)mytext,type_conversion_ok=proj.readEntry("myplugin","mytext","default text")myint,type_conversion_ok=proj.readNumEntry("myplugin","myint",123)mydouble,type_conversion_ok=proj.readDoubleEntry("myplugin","mydouble",123)mybool,type_conversion_ok=proj.readBoolEntry("myplugin","mybool",123)