📄 qdatetimeedit.3qt
字号:
'\" t.TH QDateTimeEdit 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQDateTimeEdit \- Combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes.SH SYNOPSIS\fC#include <qdatetimeedit.h>\fR.PPInherits QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQDateTimeEdit\fR ( QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fBQDateTimeEdit\fR ( const QDateTime & datetime, QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fB~QDateTimeEdit\fR ()".br.ti -1c.BI "QDateTime \fBdateTime\fR () const".br.ti -1c.BI "QDateEdit * \fBdateEdit\fR ()".br.ti -1c.BI "QTimeEdit * \fBtimeEdit\fR ()".br.ti -1c.BI "virtual void \fBsetAutoAdvance\fR ( bool advance )".br.ti -1c.BI "bool \fBautoAdvance\fR () const".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "virtual void \fBsetDateTime\fR ( const QDateTime & dt )".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBvalueChanged\fR ( const QDateTime & datetime )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "QDateTime \fBdateTime\fR - the editor's datetime value".br.in -1c.SH DESCRIPTIONThe QDateTimeEdit class combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes..PPQDateTimeEdit 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()..PPThe date format 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..PPIt is recommended that the QDateTimeEdit is initialised with a datetime, e.g..PP.nf.br QDateTimeEdit *dateTimeEdit = new QDateTimeEdit( QDateTime::currentDateTime(), this );.br dateTimeEdit->dateEdit()->setRange( QDateTime::currentDate(),.br QDateTime::currentDate().addDays( 7 ) );.br.fiHere 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..PPTerminology: 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..PP<center>.ce 1.B "[Image Omitted]".PP</center>.PPSee also QDateEdit, QTimeEdit, Advanced Widgets, and Time and Date..SH MEMBER FUNCTION DOCUMENTATION.SH "QDateTimeEdit::QDateTimeEdit ( QWidget * parent = 0, const char * name = 0 )"Constructs an empty datetime edit with parent \fIparent\fR and called \fIname\fR..SH "QDateTimeEdit::QDateTimeEdit ( const QDateTime & datetime, QWidget * parent = 0, const char * name = 0 )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPConstructs a datetime edit with the initial value \fIdatetime\fR, parent \fIparent\fR and called \fIname\fR..SH "QDateTimeEdit::~QDateTimeEdit ()"Destroys the object and frees any allocated resources..SH "bool QDateTimeEdit::autoAdvance () const"Returns TRUE if auto-advance is enabled, otherwise returns FALSE..PPSee also setAutoAdvance()..SH "QDateEdit * QDateTimeEdit::dateEdit ()"Returns the internal widget used for editing the date part of the datetime..SH "QDateTime QDateTimeEdit::dateTime () const"Returns the editor's datetime value. See the "dateTime" property for details..SH "void QDateTimeEdit::setAutoAdvance ( bool advance )\fC [virtual]\fR"Sets the auto advance property of the editor to \fIadvance\fR. If set to TRUE, the editor will automatically advance focus to the next date or time section if the user has completed a section..SH "void QDateTimeEdit::setDateTime ( const QDateTime & dt )\fC [virtual slot]\fR"Sets the editor's datetime value to \fIdt\fR. See the "dateTime" property for details..SH "QTimeEdit * QDateTimeEdit::timeEdit ()"Returns the internal widget used for editing the time part of the datetime..SH "void QDateTimeEdit::valueChanged ( const QDateTime & datetime )\fC [signal]\fR"This signal is emitted every time the date or time changes. The \fIdatetime\fR argument is the new datetime..SS "Property Documentation".SH "QDateTime dateTime"This property holds the editor's datetime value..PPThe datetime edit's datetime which may be an invalid datetime..PPSet this property's value with setDateTime() and get this property's value with dateTime()..SH "SEE ALSO".BR http://doc.trolltech.com/qdatetimeedit.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qdatetimeedit.3qt) and the Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -