For my attribute table I created a custom form in Qt Designer. The table has a date field and a time field.
In Qt Designer there are widgets for entering date and time but what data type is expected for the fields in my attribute table in QGIS?
The values always stays NULL in every case, when I choose date, datetime or text. Under Layer properties when I choose the edit widget "calendar" there is a calendar popup even when I use my custom form.
Answer
You need to edit the properties of yours fields Date and Time in QGIS.
- Go to the properties of your layer.
- Select the Fields tab.
- In the line of your field (date and time), click on Line edit.
- Select Date/Time.
- And then you can specify the format of your date or time -> it must be the same as defined in Qt Designer!
If the properties are the same in your Qt form and in the fields parameters of your layer, the binding will be done automatically.
No comments:
Post a Comment