Using QGIS (2.14) is it possible on the data form for an attribute to have a colour (or other formatting) based on its value?
For example if my data has a field 'quality' which has a value 'good' or 'medium' or 'bad'. I'd like the field in the attribute form to show up green/orange/red depending on this value.
I'd be happy with a workaround - for example a symbol or icon that appears beside the field, coloured background to the field, and so on.
I'm happy to use QT Designer to create the data form. I'm happy to edit the form xml by hand. I'll struggle if the answer is that I need to use more than a line or two of Python code so I'm probably looking for answers which don't require this.
I also need the formatting to show up whether or not the layer is in edit mode (because the main data I'm using won't be editable).
EDIT: Note that I'm only looking for solutions that work for a QGIS data form, not on the attribute table, and not on exported data. The aim is to make data as easy to understand as possible, so a user working with the identify tool can quickly see/understand key information about a feature shown on the map. The real data I'm working with is complex and front-line users need to be assisted to understand it.