Discussion:
Historical QTBUG-277
Hans-Peter Jansen
2011-06-09 19:09:36 UTC
Permalink
Hi,

Phil Thompson of PyQt fame brought the related blogs and finally this ML to
my attention. Thanks, Phil.

This all describes a bright future of our beloved framework INCLUDING a path
onto current mobile platforms. Cool, guys. Thanks.

Hopefully you get the QML-C++ API issue sorted out properly. As long as it
is going to be possible to generate dynamic dialogs with QML widgets
programmatically using official C++ calls, things like dynamically
generated forms and generic SQL query dialogs keep being possible with QML
(something we're doing all the time with PyQt). Or do you really want us
generate QML sourcecode, only to feed the result to the JS interpreter?
Will not try to find words about such an "architecture" now...

Sorry for degression and back to subject.

While I understand, that QWidgets are getting the lower echelons, I feel
like asking about tackling one major show stopper in certain Qt scenarios:

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, the widgets force a valid date/time value: leading to 2000-01-01
00:00:00 for a QDateTimeEdit. Needless to say, that this behavior isn't
desired almost all the time.

While the bug says, that QDateTime needs modifications, but didn't describe,
which, I beg to differ. What it takes is keeping invalid QDates and QTimes
as long as the user doesn't change one value at least and allowing the user
to invalidate the values.

Could we get this addressed in Qt5, please?

Thanks in advance,
Pete
John Layt
2011-06-10 10:17:32 UTC
Permalink
Post by Hans-Peter Jansen
While I understand, that QWidgets are getting the lower echelons, I feel
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, the widgets force a valid date/time value: leading to 2000-01-01
00:00:00 for a QDateTimeEdit. Needless to say, that this behavior isn't
desired almost all the time.
Hi Pete,

QDateTime and its widgets are one of the subjects that the KDE community are
very interested in. We have our own KDateTime class which supports time zones
and various edit widgets including ones that will accept invalid dates. We'd
like to simplify this by adding as much of this functionality into Qt as
possible. I'll be posting something to the list soon-ish, and discussing it
at QtCS next week. Due to the "mostly source compatible" policy for Qt5 I'm
not sure there will be a clean way to adapt QDateTimeEdit but I'll look into
it, otherwise we may need to add a new widget.

Cheers!

John.
S R
2011-06-10 13:58:13 UTC
Permalink
See some discussion about this a few weeks ago on this mailing list:
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-May/000002.html

Glad to see it is bothering other people too!
Sam
Post by John Layt
Post by Hans-Peter Jansen
While I understand, that QWidgets are getting the lower echelons, I feel
      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, the widgets force a valid date/time value: leading to 2000-01-01
00:00:00 for a QDateTimeEdit. Needless to say, that this behavior isn't
desired almost all the time.
Hi Pete,
QDateTime and its widgets are one of the subjects that the KDE community are
very interested in.  We have our own KDateTime class which supports time zones
and various edit widgets including ones that will accept invalid dates.  We'd
like to simplify this by adding as much of this functionality into Qt as
possible.  I'll be posting something to the list soon-ish, and discussing it
at QtCS next week.  Due to the "mostly source compatible" policy for Qt5 I'm
not sure there will be a clean way to adapt QDateTimeEdit but I'll look into
it, otherwise we may need to add a new widget.
Cheers!
John.
_______________________________________________
Qt5-feedback mailing list
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
Hans-Peter Jansen
2012-01-30 23:10:58 UTC
Permalink
Post by John Layt
Post by Hans-Peter Jansen
While I understand, that QWidgets are getting the lower echelons, I
feel like asking about tackling one major show stopper in certain
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
if the user just tabs over such a field, the widgets force a valid
date/time value: leading to 2000-01-01 00:00:00 for a
QDateTimeEdit. Needless to say, that this behavior isn't desired
almost all the time.
Hi Pete,
QDateTime and its widgets are one of the subjects that the KDE
community are very interested in. We have our own KDateTime class
which supports time zones and various edit widgets including ones
that will accept invalid dates. We'd like to simplify this by adding
as much of this functionality into Qt as possible. I'll be posting
something to the list soon-ish, and discussing it at QtCS next week.
Due to the "mostly source compatible" policy for Qt5 I'm not sure
there will be a clean way to adapt QDateTimeEdit but I'll look into
it, otherwise we may need to add a new widget.
Cheers!
John.
Hi John,

I appreciate all your work with QDate{Time}. Nevertheless, I would like
to see something done in this very respect, too, since the existence of
this behavior is nagging me for a long time.. I like KDE, but in order
to get sane basic widget behavior in this respect, I don't think, that
pulling in KDE is really a sound option (think mobile devices).

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 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 and set an invalid date{time},
if the user presses delete, or if {s}he removes all values with
backspace, and finally add a similar widget property..

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 rusty at best.

Anyway, I would love to see Qt5 appearing without this very flaw, and I
bet, that a considerable amout of other users will be very grateful for
such an improvement.

Pete
Thiago Macieira
2012-01-30 23:41:49 UTC
Permalink
Pete
Hi Pete

Please use the development mailing list for these discussions (***@qt-
project.org, you need to subscribe before you can post).

John has been working mostly on the low-level classes. You're talking about
the widgets and John has not volunteered (yet anyway) to work on them.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Loading...