[GIS] How to add buttons to QT ui for qgis feature forms to loop through attributes

loopqgisqt

I'm looking for a bit of guidance.

I'm happy creating a standard feature form using QT designer (as excellently documented here) for QGIS but I was wondering how you add a forward and back button to a feature form, so that it would loop through all the identified features in QGIS?

Below is a mockup of what I'd like to achieve but need some help. You'll see that I haven't added in any 'line edits' in my tabs and that was purely to produce a mockup for the purposes of this question.

enter image description here

Best Answer

This particular way is currently not possible with QGIS (at least not without an advanced plugin)

However, an alternative approach be almost what you want without any python at all and without adding custom buttons.

  • Select some features
  • Open the attribute table and switch to form view (See highlighted button in picture).
  • Choose "Show Selected Features" and navigate with the help of the list on the left.

Feature form, Dual View