QGIS Custom Form – Integrating QGIS Relations Widget in Custom Form

pyqtqgis

I've just begun exploring QGIS relations option, now in version QGIS 2.2, details here: http://blog.vitu.ch/10112013-1201/qgis-relations

This is a great implementation of something I've been attempting to manually organize for a while now. Now, i'm wondering how to integrate the relations widget into a custom form (currently, it automatically adds only if using the auto generated form). I'm new to PyQt Designer, so i'm not sure where to start.

Best Answer

In Qt Designer:

  1. Create a new QWidget
  2. Add a custom property and name it qgisRelation
  3. Set the value of the new qgisRelation-property to the id of the relation.

Adding a custom property in Qt Designer

Related Question