[Qgis-developer] Adding buttons to the attribute table toolbar
Hugo Mercier
hugo.mercier at oslandia.com
Wed Aug 31 03:09:01 PDT 2016
Ah indeed :)
I see. I don't know very well this part of the code, but I don't think
there is a direct way to add a button in the attribute table.
You could always use QT introspection to look for the QToolBar and add
your own button ... but it's quite hacky.
Or we could extend a bit the concept of action to allow the action to be
called with a list of features, rather than with only one feature. By
default it would call the action for each selected feature. If needed,
we could add a way for the user to add its own "multiple feature"
version of the action.
On 31/08/2016 11:40, Neumann, Andreas wrote:
> Hi Hugo,
>
> Yes - I know (we paid for that ;-) ). But this is more for "per-feature"
> actions - whereas I am after actions on a set of features (the selected
> features) - so in my case the custom buttons should be only once in the
> toolbar of the attribute table - not for every feature.
>
> Thanks,
>
> Andreas
>
> On 2016-08-31 11:33, Hugo Mercier wrote:
>
>> Hi Andreas,
>>
>> I think you can create Python-based actions and use the new option "show
>> them in the attribute table"
>>
>> On 31/08/2016 09:27, Neumann, Andreas wrote:
>>> Hi,
>>>
>>> Is it possible to add my own buttons to the toolbar of the attribute
>>> table window?
>>>
>>> If yes - do you have some sample code how to do this?
>>>
>>> My goal is to trigger some Python code that would process the currently
>>> selected features of the attribute table.
>>>
>>> Thanks,
>>>
>>> Andreas
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org <mailto:Qgis-developer at lists.osgeo.org>
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org <mailto:Qgis-developer at lists.osgeo.org>
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
More information about the Qgis-developer
mailing list