[Qgis-user] Customised attributes form

Matthias Kuhn matthias.kuhn at gmx.ch
Thu Mar 12 01:44:36 PDT 2015


Hi maxx,

This may be what you are looking for:

http://blog.vitu.ch/10142013-1847/write-your-own-qgis-form-elements

Best
Matthias

On 03/12/2015 09:36 AM, emmexx wrote:
> I'm new to qgis programming and to the inner workings and APIs.
> I'd like to use a customized form for editing feature attributes.
> I found out the relevant articles on the qgis blog and it works for
> simple elements. But I need a more complex widget and an even more
> complex management of some of the attribute values.
> I have one field whose value is a comma separated list of ids.
> The allowed values must be chosen from a tree.
> I tried to use a QTreeWidget but I couldn't find a way to manage the
> transition from the value in the field and its representation in the
> tree widget and vice versa.
>
> I tried to find some signal that let me intercept the feature value
> before it is passed or loaded by the tree widget and to intercept the
> tree widget value before it is passed to the feature.
> Something like beforeLoadValue and beforeSaveValue.
>
> But I'm not sure that is the right strategy in qgis and qt.
>
> I'm not even sure if it's possible to intercept (and modify) the
> values of the feature.
>
> Any comments and suggestions are welcomed
>
> Thank you
>     maxx
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user




More information about the Qgis-user mailing list