On 08-11-18 08:08, Nyall Dawson wrote:
On Thu, 8 Nov 2018 at 17:02, Raymond Nijssen <r.nijs...@terglobo.nl> wrote:

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

item.isVisible()

It's from the base QGraphicsItem class.

Nyall


Thanks Nyall, works!

I'm also using setVisible() now, instead of setVisibility(). But now I wonder why the latter exists.

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