<p>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:<p>
<pre>QgsProject.instance().writeEntry("qgis2web", param, value)
QgsProject.instance().readBoolEntry("qgis2web", param)[0]</pre>
<p>These store and retrieve values for GUI checkboxes:</p>
<pre>if isinstance(value, bool):
if value:
self.setCheckState(1, Qt.Checked)
else:
self.setCheckState(1, Qt.Unchecked)
</pre>
I don't know if <code>isinstance</code> still recognizes the value as a boolean after it has been saved and retrieved.
<div class="signature" style="margin-top:1em;color:#666666;font-size:11px;">
<p><a href="https://www.amazon.co.uk/gp/product/B01IW69040/ref=as_li_tl?ie=UTF8&camp=1634&creative=6738&creativeASIN=B01IW69040&linkCode=as2&tag=piespyadvei0c-21" target="_top" rel="nofollow" link="external"><img src="https://images-eu.ssl-images-amazon.com/images/I/41k3x4UCk-L._AC_AC_SR98,95_.jpg" style="float: left; margin-right: 1em;" alt="Pie Spy: Adventures in British pastry 2010-11" />Buy <em>Pie Spy: Adventures in British pastry 2010-11</em> on Amazon</a></p>
</div>
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Boolean-project-settings-tp5282056.html">Boolean project settings</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/Quantum-GIS-Developer-f4099106.html">Quantum GIS - Developer mailing list archive</a> at Nabble.com.<br/>