[QGIS-Developer] Create a custom python based widget to be used in attribute forms

Bo Victor Thomsen bo.victor.thomsen at gmail.com
Sun Apr 5 01:28:43 PDT 2020


Hi List -

I remember (very vaguely) an blog-article describing how to make a 
custom pyqt widget to use in QGIS attribute forms.

I'm not talking about designing a custom form with python logic (I know 
how do that) but making a custom widget as a replacement for one of the 
build-in widget like calendar or value-relation widgets a.o.

My goal is to make a widget based on a qtreeview or qtreewidget that is 
populated using a layer with three columns "parent", "key" and "value", 
where "parent" is used to build the tree structure.

Something like the existing value-relation widget but with a treewidget 
instead of a combobox, that can be used to create multi step 
"drill-down" functionality.

However, I can't find the article. Is there anyone on this mailing-list, 
that can point me in the right direction ?

(The correct course of action would be to program it in C++. However I 
can't find the time - or intellectual energy -  to brush up my very 
rusty knowledge of C++ :-/)

-- 

Med venlig hilsen / Kind regards

Bo Victor Thomsen



More information about the QGIS-Developer mailing list