[Qgis-developer] custom attribute inserting/editing

Martin Dobias wonder.sk at gmail.com
Fri Feb 15 05:29:59 EST 2008


On Wed, Feb 13, 2008 at 3:24 PM, Bud P. Bruegger <bud at comune.grosseto.it> wrote:
>  I am looking into the possibility of custom attribute editing, i.e.,
>  to customize how the attributes for a certain feature type are
>  presented.  Customizations could include combo boxes/option selectors
>  with a predifined set of possible values (possibly taken from a postgres
>  table; using a code but presenting a full label; etc.), some constraint
>  checks on an attribute fields, etc.
>
>  [...]
>
>  So my questions are:
>  * is this feasible?

Yes, I think so. If I understand correctly what you want is to show a
dialog for a feature which will show the fields with according
(customized) editing widgets.
With Qt there's no problem to create dialogs on the fly, for example
in GRASS plugin QGIS shows forms for GRASS modules in such way - the
definition of the form is always stored in an XML file which is read
and the form is created accordingly.

>  * is this something a python programmer without GUI experience can do
>  (i.e., I)?

Indeed. Progamming with Qt (or PyQt in your case) is not very hard.
You'll just need some time to poke in their API, look at the examples
etc.

>  * if so, where would I start?

Start learning Qt, particularly take look at classes like QWidget,
QLayout and other UI related stuff.

Martin


More information about the Qgis-developer mailing list