Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The QDateTimeEdit class combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes. More...
#include <qdatetimeedit.h>
Inherits QWidget.
The QDateTimeEdit class combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes.
QDateTimeEdit consists of a QDateEdit and QTimeEdit widget placed side by side and offers the functionality of both. The user can edit the date and time by using the keyboard or the arrow keys to increase/decrease date or time values. The Tab key can be used to move from section to section within the QDateTimeEdit widget, and the user can be moved automatically when they complete a section using setAutoAdvance(). The datetime can be set with setDateTime().
The dateformat is read from the system's locale settings. It is set to year, month, day order if that is not possible. see QDateEdit::setOrder() to change this. Times appear in the order hours, minutes, seconds using the 24 hour clock.
It is recommended that the QDateTimeEdit is initialised with a datetime, e.g.
QDateTimeEdit *dateTimeEdit = new QDateTimeEdit( QDateTime::currentDateTime(), this ); dateTimeEdit->dateEdit()->setRange( QDateTime::currentDate(), QDateTime::currentDate().addDays( 7 ) );Here we've created a new QDateTimeEdit set to the current date and time, and set the date to have a minimum date of now and a maximum date of a week from now.
Terminology: A QDateEdit widget consists of three 'sections', one each for the year, month and day. Similarly a QTimeEdit consists of three sections, one each for the hour, minute and second. The character that separates each date section is specified with setDateSeparator(); similarly setTimeSeparator() is used for the time sections.
See also QDateEdit, QTimeEdit, Advanced Widgets and Time and Date.
Constructs a datetime edit with the initial value datetime, parent parent and name name.
See also setAutoAdvance().
Returns the datetime value of the editor. See the "dateTime" property for details.
Sets the datetime value of the editor to dt. See the "dateTime" property for details.
This signal is emitted every time the date or time changes. The datetime argument is the new datetime.
This property holds the datetime value of the editor.
The datetime edit's datetime which may be an invalid datetime.
Set this property's value with setDateTime() and get this property's value with dateTime().
This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.
Copyright © 2002 Trolltech | Trademarks | Qt version 3.0.5
|