2

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:

enter image description here

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.

  • Did you name the QT-control the same as the columnname? This is how the databinding is mapped. – Jakob Feb 7 at 12:08
  • yes, sorry, forgot to tell it in the OP. Edited – Egidi Feb 7 at 12:18
  • can you include screenshots from the attribute properties and qt creator that demonstrate the question by Jakob? – Matthias Kuhn Feb 7 at 13:12
  • @MatthiasKuhn trust me, I am doing it right, with QTextEdit it works like a charm – Egidi Feb 8 at 11:38
  • There are different spinboxes for integers and doubles, maybe it's related to this? I just wanted to have as much information available here to get you a solution. – Matthias Kuhn Feb 8 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.