| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 8 | |
If a QDateTime widget isn't initialized it displays "00/00/0000". Of what value is date widget that displays "00/00/0000"? This widget seems like it is desperately in need of a setNullText() function. It could then be used to display a value (such as "None") for a date that has not yet been entered or which I don't want set to the current date. Has anyone worked with QDateTime to do this? __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/
Bryan Brunton <bryanbrun@yahoo.com> wrote on 3/20/02 7:33:21 AM: > >If a QDateTime widget isn't initialized it displays "00/00/0000". Of >what value is date widget that displays "00/00/0000"? > >This widget seems like it is desperately in need of a setNullText() >function. It could then be used to display a value (such as "None") >for a date that has not yet been entered or which I don't want set to >the current date. > >Has anyone worked with QDateTime to do this? I derived my date/time spinbox selection widget from QSpinbox actually, but it does allow quite a bit of flexibility in what it displays. In this case you could just call setFormat() to display whatever text you like. You can download the source from: http://www.wroth.addr.com/downloads/datetime.zip -W. Roth wroth@speakeasy.org