I have created a custom form in QT Designer with a QSpinBox and a QLineEdit. I named the objects the same as the column names so that qgis can bind the values.
Added the .ui to a layer.
The widgets are displayed with the value defined in the value field in QT Designer:
and I can edit the value. If I accept and reopen the form I always see the value in QT Designer but not the value I previously edited.
There must be something I am missing.
I am using QGIS 2.12. I have to use this version for now.