Re: [QGIS-Developer] Customizing Layer Panel

2023-04-27 Thread Giulio Fattori via QGIS-Developer
*Cc:* qgis-developer@lists.osgeo.org *Subject:* Re: [QGIS-Developer] Customizing Layer Panel Great, what if I want an icon too? Thanks in advance for any help Giulio Il 27/04/2023 00:06, Nyall Dawson via QGIS-Developer ha scritto: On Thu, 27 Apr 2023 at 07:42, Catania, Luke A ERDC-RDE-GR

Re: [QGIS-Developer] Customizing Layer Panel

2023-04-27 Thread Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
ia, Luke A ERDC-RDE-GRL-VA CIV Cc: qgis-developer@lists.osgeo.org Subject: Re: [QGIS-Developer] Customizing Layer Panel Great, what if I want an icon too? Thanks in advance for any help Giulio Il 27/04/2023 00:06, Nyall Dawson via QGIS-Developer ha scritto: On Thu, 27 Apr 2023 at 07:42, Catan

Re: [QGIS-Developer] Customizing Layer Panel

2023-04-27 Thread Etienne Trimaille via QGIS-Developer
You should have a look at the QAction documentation : https://doc.qt.io/qt-5/qaction.html The first parameter, you can give a QIcon. For some predefined icon in QGIS, you can look to https://pyqgis-icons-cheatsheet.geotribu.fr/ Le jeu. 27 avr. 2023 à 13:15, Giulio Fattori via QGIS-Developer <

Re: [QGIS-Developer] Customizing Layer Panel

2023-04-27 Thread Giulio Fattori via QGIS-Developer
Great, what if I want an icon too? Thanks in advance for any help Giulio Il 27/04/2023 00:06, Nyall Dawson via QGIS-Developer ha scritto: On Thu, 27 Apr 2023 at 07:42, Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer wrote: > > But I am looking to access the dock widget and add two

Re: [QGIS-Developer] Customizing Layer Panel

2023-04-26 Thread Nyall Dawson via QGIS-Developer
On Thu, 27 Apr 2023 at 07:42, Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer wrote: > > But I am looking to access the dock widget and add two icons in its row of icons or maybe a menu. It's not available via the stable API, but let's not let that stop us!  layer_tree =

[QGIS-Developer] Customizing Layer Panel

2023-04-26 Thread Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
Looking to add two icons to the QGIS Layer Panel that would access custom code to sort the layers. I already have the code. It's not a simple geometry type or alphabetical sort but I'm all set with that code anyway. I just want to add icons into the layer panel. I found this site that shows