[Qgis-developer] Boolean project settings
Tom Chadwin
tom.chadwin at nnpa.org.uk
Tue Aug 23 09:24:13 PDT 2016
Are there any gotchas when reading and writing boolean project settings? I'm
getting baffled by why I can't get mine to work properly:
QgsProject.instance().writeEntry("qgis2web", param,
value)QgsProject.instance().readBoolEntry("qgis2web", param)[0]
These store and retrieve values for GUI checkboxes:
if isinstance(value, bool): if value: self.setCheckState(1,
Qt.Checked) else: self.setCheckState(1, Qt.Unchecked)
I don't know if isinstance still recognizes the value as a boolean after it
has been saved and retrieved.
-----
Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Boolean-project-settings-tp5282056.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160823/09541e94/attachment.html>
More information about the Qgis-developer
mailing list