[Qgis-developer] customization option issues

Radim Blazek radim.blazek at gmail.com
Fri Nov 29 00:59:45 PST 2013


On Wed, Nov 27, 2013 at 6:40 PM, matteo <matteo.ghetta at gmail.com> wrote:
> Hi guys,
> trying to customize the qgis toolbar and menu I found something weird (maybe
> a bug)
>
> saving the customization, you have to add manually the .ini suffix to the
> file, otherwise you are not able to load it

"Save to file" is using standard dialog with "Automatically select
filename extension (.ini)". For me it works as expected, i.e. adds
".ini" suffix to file.

> there are some problem with the customization of the menu: e.g. after
> removing "geoprocessing" and "geometry" from the Vector menu, when qg
> restarts they are are still enabled. Same issue for the others menu

Customization only works for objects with objectName. objectName is
automatically set by Qt for objects created in designer (compiled from
.ui). For objects created programmatically it has to be set. I have
added object names to fTools in d334b46, but they have to be added in
all plugins.

Recommendation for plugin authors: when you are adding QMenu or
QAction, always set its object name, e.g.:
   myMenu = QMenu('My menu")
   myMenu.setObjectName("myMenu")

Issue http://hub.qgis.org/issues/9134

Radim


> Cheers
>
> Matteo
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list