[Qt-interest] QDateEdit and null values
Harry Sfougaris
hsfougaris at gmail.com
Tue Oct 26 09:34:30 CEST 2010
In trying to overcome QDateEdit's limitation of not being able to represent a "NULL" value.
I have been using setSpecialValueText("-") and setDate( minimumDate()) which for my purposes makes the minimumDate=NULL (displayed as a '-' to the user), and I then intervene in the beforeInsert signal of my QSqlTableModel, and replace all minimumDates with NULL.
However, this has one annoying side effect: when the user tries to select a date, he starts of at 14/9/17xx. I have been unsuccessfully trying to find a signal that is emitted before the calendar popup is displayed, so I may call showToday.
Can anyone please help?
Thanks,
Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101026/0d076c7f/attachment.html
More information about the Qt-interest-old
mailing list