[QGIS-Developer] How to make custom toolbar actions work with Interface Customization dialog

Paul Wittle paul.wittle at dorsetcouncil.gov.uk
Fri Oct 7 06:04:42 PDT 2022


Hi,

Answering my own question I think. I added .setObjectName() on my QAction object and now I get an actual name in the name column. It seems to be remembering my selections now in the Interface Customization so hopefully this reply will help others.

Thanks,
Paul

From: Paul Wittle
Sent: 07 October 2022 13:31
To: qgis-developer at lists.osgeo.org
Subject: How to make custom toolbar actions work with Interface Customization dialog

Hi,

I’ve added a number of toolbars to QGIS in a custom python plugin using the basic templates and adding a QAction element. My buttons appear and they work but if I try to switch off a button using the Interface Customiszation options it doesn’t work because the toolbar can be toggled but not the actual buttons within it.

Can anyone point me towards the right setting to configure a button so it can be managed in the Interface Customization dialog?

The buttons do appear individually but there is not name in the column just the icon and unchecking them has no impact on the *.ini file saved. I will continue to search the documentation online for an answer but struggling to work out which property to investigate so thought I’d see if anyone else already knows the answer 😊

Thank you,
Paul
This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/data-protection
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221007/0809ba54/attachment-0001.htm>


More information about the QGIS-Developer mailing list