2

I have a custom form created with QT Designer on which I have several comboboxes among other stuff. All the fields have the correct names corresponding to the database.

One of these comboboxes has a strange behavior. When I choose a value from the dropdown it is properly stored in the database. I can see it in the attributes table. But when I'm trying to edit the values on the form, every other value (either on other comboboxes, text fields or checkboxes) displays correctly, except the one combobox that always displays the first value in the dropdown menu despite the fact that some other value may be stored in the database.

Any thoughts on what's wrong?

  • What datatype does the field in question have? what type of edit widget did you define in layer properties->fields? – Matthias Kuhn Mar 13 '14 at 8:33
  • The edit widget I defined as Unique Values. But I found a workaround. See answer below. Thanks. – GsetIT Mar 13 '14 at 9:22
3

I found a workaround. I deleted all the data from the combobox in QT Designer and I defined the edit widget in Layer Properties -> Fields as Value Map. There, I put the data which I want displayed and voila!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.