Re: [QGIS-Developer] get visibility from layout items with python

2018-11-08 Thread Nyall Dawson
On Thu, 8 Nov 2018 at 17:25, Raymond Nijssen wrote: > > > > On 08-11-18 08:20, Nyall Dawson wrote: > > On Thu, 8 Nov 2018 at 17:18, Raymond Nijssen wrote: > > > >> I'm also using setVisible() now, instead of setVisibility(). But now I > >> wonder why the latter exists. > > > > Check the API dox -

Re: [QGIS-Developer] get visibility from layout items with python

2018-11-07 Thread Raymond Nijssen
On 08-11-18 08:20, Nyall Dawson wrote: On Thu, 8 Nov 2018 at 17:18, Raymond Nijssen wrote: I'm also using setVisible() now, instead of setVisibility(). But now I wonder why the latter exists. Check the API dox -- there's a specific note there that you need to call setVisibility instead of

Re: [QGIS-Developer] get visibility from layout items with python

2018-11-07 Thread Nyall Dawson
On Thu, 8 Nov 2018 at 17:18, Raymond Nijssen wrote: > I'm also using setVisible() now, instead of setVisibility(). But now I > wonder why the latter exists. Check the API dox -- there's a specific note there that you need to call setVisibility instead of setVisible, or visiblity won't work corre

Re: [QGIS-Developer] get visibility from layout items with python

2018-11-07 Thread Raymond Nijssen
On 08-11-18 08:08, Nyall Dawson wrote: On Thu, 8 Nov 2018 at 17:02, Raymond Nijssen 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

Re: [QGIS-Developer] get visibility from layout items with python

2018-11-07 Thread Nyall Dawson
On Thu, 8 Nov 2018 at 17:02, Raymond Nijssen 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 = QgsL

[QGIS-Developer] get visibility from layout items with python

2018-11-07 Thread Raymond Nijssen
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(it