Bug report #18299

DateTime widget issue with current date

Added by gcarrillo - over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Denis Rouzaud
Category:Edit widget
Affected QGIS version:3.1(master) Regression?:No
Operating System:GNU/Linux (Linux Mint based on Ubuntu Xenial) Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:26190

Description

As you can see in the attached gif, sometimes selecting the current date doesn't set the attribute value.

date_time_widget.gif (4.63 MB) gcarrillo -, 2018-03-01 06:21 PM

Associated revisions

Revision 8bd48969
Added by Denis Rouzaud over 6 years ago

fix #18299 date time widget does not correctly set value from calendar

the use of QStyle::subControlRect was returning only the rect of the arrows and not of the whole clickable area. QStyle::hitTestComplexControl has been used instead

Revision 8f9d17e1
Added by Matthias Kuhn over 6 years ago

Merge pull request #6548 from 3nids/fix_datetime_null

fix #18299 date time widget does not correctly set value from calendar

Revision ad6491db
Added by Denis Rouzaud over 6 years ago

fix date time NULL handling (#6591)

  • fix #18299 date time widget does not correctly set value from calendar

the use of QStyle::subControlRect was returning only the rect of the arrows and not of the whole clickable area. QStyle::hitTestComplexControl has been used instead

  • correctly emit NULL and not empty string for date/time widget for string fields
  • finer tuning of style options

History

#1 Updated by Matthias Kuhn over 6 years ago

  • Assignee set to Denis Rouzaud

#2 Updated by Giovanni Manghi over 6 years ago

  • Affected QGIS version changed from master to 3.1(master)

#3 Updated by Denis Rouzaud over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF