[Development] Feature freeze and Alpha
Hans-Peter Jansen
hpj at urpla.net
Thu Feb 9 23:27:55 CET 2012
Dear Lars,
On Thursday 09 February 2012, 21:00:40 John Layt wrote:
> On Sunday 05 Feb 2012 14:12:48 lars.knoll at nokia.com wrote:
> > Is there anything that I have now forgotten that really *must* be
> > in 5.0 (i.e. it really can't be done in a BC/SC way for Qt 5.1)? If
> > you have such an item, please speak up, otherwise I'll consider the
> > above exception list as final.
sorry for chiming in that late, but my past attempts to direct some
perception of the audience on a long time flaw of Qt seem to have
failed so far. Please allow me to quote myself with a historical Qt bug
report and a post to qt5-feedback:
http://bugreports.qt.nokia.com/browse/QTBUG-277
It's about QDateEdit, QTimeEdit and QDateTimeEdit allowing to keep
invalid dates, times and datetimes invalid (with databases, a NULL
value of such a field usually has a special meaning (think "death-day"
of still living people). Current behavior since Qt3 is: if the user
just tabs over such a field in a (database) form, the widgets force a
valid date/time value: leading to a value of 2000-01-01 00:00:00 for a
QDateTimeEdit. Needless to say, that this behavior isn't desired almost
all the time. At least, the auto completion should be controllable in
some way. Some dates might only be valid as past or as future dates.
While the bug says, that QDateTime needs modifications, but didn't
describe, which, I beg to differ. QDate and QTime _do_ allow invalid
values. What it takes is keep invalid QDates and QTimes as long as the
user doesn't change one value (at least) and allow the user to
invalidate the values.
Here's some food for implementation thoughts: how about adding some
global boolean flag (application wide), that allows enabling invalid
Q{Date,Time,DateTime} in their respective edit widgets. If that flag is
enabled, change the widget behavior in a way, that
* tabbing over it will keep an invalid date{time},
* allow to explicitely set an invalid date{time} programatically,
* disable auto completion,
* set an invalid date{time}, if the user presses delete, or removes all
values with backspace,
* and finally add a widget property to control this behavior..
This should be possible without violating source code compatibility of
these widgets. Sorry for not providing a patch, but being a PyQt hacker
myself, my C++ skills are pretty rusty at best.
Anyway, I would love to see Qt5 appearing without this very flaw, and I
bet, that a considerable amout of Qt developers will be very grateful
for such an improvement.
Thanks in advance,
Pete
More information about the Development
mailing list