Hi everybody I'm not shure, if this is the right place to ask pyqgis-newbee-questions. Should I better ask in the user-request-list? Please excuse me if so.
I'm writing a custom expression in QGIS 3.77.2 to define the position of layer items by datadefined override. The function works fine. But until now I hardcoded the name of my layout, because I'm not able to figure out, how expression context work. How can I access the layout and layout item, in which the expression is used? A hint or example would make me happy! :) @qgsfunction(args='auto', group='Custom', referenced_columns=[]) def getItemPosition(itemId, border, feature, parent): myproject=QgsProject.instance() mylayout= myproject.layoutManager().layoutByName("name of my layout") targetitem=mylayout.itemById(itemId) ... Thank you Bruno > qgis-developer-requ...@lists.osgeo.org hat am 18.06.2022 21:00 CEST > geschrieben: > > > Send QGIS-Developer mailing list submissions to > qgis-developer@lists.osgeo.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.osgeo.org/mailman/listinfo/qgis-developer > or, via email, send a message with subject or body 'help' to > qgis-developer-requ...@lists.osgeo.org > > You can reach the person managing the list at > qgis-developer-ow...@lists.osgeo.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of QGIS-Developer digest..." > > > Today's Topics: > > 1. Changelog, please check (Richard Duivenvoorde) > 2. Re: [Qgis-community-team] Changelog, please check (Tim Sutton) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 18 Jun 2022 06:45:01 +0200 > From: Richard Duivenvoorde <rdmaili...@duif.net> > To: qgis-developer <qgis-developer@lists.osgeo.org>, qgis-community > <qgis-community-t...@lists.osgeo.org> > Subject: [QGIS-Developer] Changelog, please check > Message-ID: <d5eae9ef-29f8-8366-dfd4-e4199b123...@duif.net> > Content-Type: text/plain; charset=UTF-8; format=flowed > > Hi People, > > I (silently) added the visual changelog 3.26 to the site already, please > check: > > https://qgis.org/en/site/forusers/visualchangelog326/index.html > > for any glitches. > > If found, either let me know, or just fix it yourself in the rst at > > https://github.com/qgis/QGIS-Website/edit/master/source/site/forusers/visualchangelog326/index.rst > > so I can push stuff to transifex (for translations) after the packaging is > finished (when the banner has also been updated). > > Regards, > > Richard Duivenvoorde > > > ------------------------------ > > Message: 2 > Date: Sat, 18 Jun 2022 12:32:54 +0100 > From: Tim Sutton <t...@kartoza.com> > To: Richard Duivenvoorde <rdmaili...@duif.net> > Cc: qgis-developer <qgis-developer@lists.osgeo.org>, qgis-community > <qgis-community-t...@lists.osgeo.org> > Subject: Re: [QGIS-Developer] [Qgis-community-team] Changelog, please > check > Message-ID: > <CAES-DZS9f5dixeO=ycoxwozwmwc6_5wahszclvklrzhl-q_...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > That looks great @Richard Duivenvoorde <rdmaili...@duif.net> thanks so > much! > > Regards > > Tim > > On Sat, Jun 18, 2022 at 5:54 AM Richard Duivenvoorde <rdmaili...@duif.net> > wrote: > > > Hi People, > > > > I (silently) added the visual changelog 3.26 to the site already, please > > check: > > > > https://qgis.org/en/site/forusers/visualchangelog326/index.html > > > > for any glitches. > > > > If found, either let me know, or just fix it yourself in the rst at > > > > > > https://github.com/qgis/QGIS-Website/edit/master/source/site/forusers/visualchangelog326/index.rst > > > > so I can push stuff to transifex (for translations) after the packaging is > > finished (when the banner has also been updated). > > > > Regards, > > > > Richard Duivenvoorde > > _______________________________________________ > > Qgis-community-team mailing list for organizing community resources such > > as documentation, translation etc.. > > qgis-community-t...@lists.osgeo.org > > https://lists.osgeo.org/mailman/listinfo/qgis-community-team > > > > > -- > ------------------------------------------------------------------------------------------ > ? > > Tim Sutton > Visit http://kartoza.com to find out about open source: > * Desktop GIS programming services > * Geospatial web development > * GIS Training > * Consulting Services > Tim is a member of the QGIS Project Steering Committee > ------------------------------------------------------------------------------------------- > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220618/a5cf216d/attachment-0001.htm> > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > 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 > > > ------------------------------ > > End of QGIS-Developer Digest, Vol 200, Issue 14 > *********************************************** _______________________________________________ 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