Re: [QGIS-Developer] How to get the name for a QgsLayoutDesignerInterface object?

2022-07-29 Thread Raymond Nijssen via QGIS-Developer

Wow, thank you so much, masterLayout() it is!

Raymond

On 29-07-2022 11:42, John Gitau wrote:

Hi Raymond,

For the window title, you can try designer.window().windowTitle().

To get the QgsPrintLayout object, you can try designer.masterLayout() 
which has the .name() method.


Cheers,

John

On Fri, 29 Jul 2022 at 12:04, Raymond Nijssen via QGIS-Developer 
mailto:qgis-developer@lists.osgeo.org>> 
wrote:


Hi developers,

I'm trying to get the name for a layout designer window, which is in a
python variable (designer) of type QgsLayoutDesignerInterface.

designer.layout() returns a QgsLayout object but that class does not
have a .name() function.

The QgsPrintLayout class does have a .name() function but I don't know
how to get a QgsPrintLayout object from my designer.

Anyone?

Kind regards,
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


--
John Gitau

___
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


Re: [QGIS-Developer] How to get the name for a QgsLayoutDesignerInterface object?

2022-07-29 Thread John Gitau via QGIS-Developer
Hi Raymond,

For the window title, you can try designer.window().windowTitle().

To get the QgsPrintLayout object, you can try designer.masterLayout() which
has the .name() method.

Cheers,

John

On Fri, 29 Jul 2022 at 12:04, Raymond Nijssen via QGIS-Developer <
qgis-developer@lists.osgeo.org> wrote:

> Hi developers,
>
> I'm trying to get the name for a layout designer window, which is in a
> python variable (designer) of type QgsLayoutDesignerInterface.
>
> designer.layout() returns a QgsLayout object but that class does not
> have a .name() function.
>
> The QgsPrintLayout class does have a .name() function but I don't know
> how to get a QgsPrintLayout object from my designer.
>
> Anyone?
>
> Kind regards,
> 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
>
-- 
John Gitau
___
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