In the python api, QgsLayoutItems have a setter for the visibility, but i cannot find a way to retrieve the visibility setting.

https://qgis.org/pyqgis/master/core/Layout/QgsLayoutItem.html


I would like to do this:

item = QgsLayoutItemLabel() # I get this from my layout
checkbox.setChecked(item.visibility()) # this fails

and later:

item.setVisibility(checkbox.checked()) # this works


Is this possible in another way? Or is it just missing and can it be added?

Thanks,
Raymond
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to