PySide.QtGui.QDateTimeEdit class provides a widget for editing dates and times.
PySide.QtGui.QDateTimeEdit allows the user to edit dates by using the keyboard or the arrow keys to increase and decrease date and time values. The arrow keys can be used to move from section to section within the PySide.QtGui.QDateTimeEdit box. Dates and times appear in accordance with the format set; see PySide.QtGui.QDateTimeEdit.setDisplayFormat() .
dateEdit = QDateTimeEdit(QDate.currentDate())
dateEdit.setMinimumDate(QDate.currentDate().addDays(-365))
dateEdit.setMaximumDate(QDate.currentDate().addDays(365))
dateEdit.setDisplayFormat("yyyy.MM.dd")
Here we've created a new PySide.QtGui.QDateTimeEdit object initialized with today's date, and restricted the valid date range to today plus or minus 365 days. We've set the order to month, day, year.
The minimum value for PySide.QtGui.QDateTimeEdit is 14 September 1752, and 2 January 4713BC for PySide.QtCore.QDate . You can change this by calling PySide.QtGui.QDateTimeEdit.setMinimumDate() , PySide.QtGui.QDateTimeEdit.setMaximumDate() , PySide.QtGui.QDateTimeEdit.setMinimumTime() ,和 PySide.QtGui.QDateTimeEdit.setMaximumTime() .
PySide.QtGui.QDateTimeEdit can be configured to allow a PySide.QtGui.QCalendarWidget to be used to select dates. This is enabled by setting the PySide.QtGui.QDateTimeEdit.calendarPopup() property. Additionally, you can supply a custom calendar widget for use as the calendar pop-up by calling the PySide.QtGui.QDateTimeEdit.setCalendarWidget() function. The existing calendar widget can be retrieved with PySide.QtGui.QDateTimeEdit.calendarWidget() .
|
A date time editing widget shown in the Windows XP widget style . |
|
A date time editing widget shown in the Macintosh widget style . |
|
A date time editing widget shown in the Plastique widget style . |
| 参数: |
|
|---|
构造空的日期时间编辑器采用 parent .
构造空的日期时间编辑器采用 parent . The value is set to date .
构造空的日期时间编辑器采用 parent . The value is set to datetime .
构造空的日期时间编辑器采用 parent . The value is set to time .
| 常量 | 描述 |
|---|---|
| QDateTimeEdit.NoSection | |
| QDateTimeEdit.AmPmSection | |
| QDateTimeEdit.MSecSection | |
| QDateTimeEdit.SecondSection | |
| QDateTimeEdit.MinuteSection | |
| QDateTimeEdit.HourSection | |
| QDateTimeEdit.DaySection | |
| QDateTimeEdit.MonthSection | |
| QDateTimeEdit.YearSection |
| 返回类型: | PySide.QtCore.bool |
|---|
This property holds the current calendar pop-up showing mode..
The calendar pop-up will be shown upon clicking the arrow button. This property is valid only if there is a valid date display format.
| 返回类型: | PySide.QtGui.QCalendarWidget |
|---|
Returns the calendar widget for the editor if PySide.QtGui.QDateTimeEdit.calendarPopup() is set to true and ( sections() & DateSections_Mask ) != 0.
This function creates and returns a calendar widget if none has been set.
This property holds the maximum date of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.minimumDate() is adjusted if necessary to ensure that the range remains valid. If the date is not a valid PySide.QtCore.QDate object, this function does nothing.
By default, this property contains a date that refers to December 31, 7999.
This property holds the maximum datetime of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.minimumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid PySide.QtCore.QDateTime object, this function does nothing.
默认 PySide.QtGui.QDateTimeEdit.maximumDateTime() can be restored with PySide.QtGui.QDateTimeEdit.clearMaximumDateTime() .
By default, this property contains a date that refers to 31 December, 7999 and a time of 23:59:59 and 999 milliseconds.
另请参阅
PySide.QtGui.QDateTimeEdit.minimumDateTime() PySide.QtGui.QDateTimeEdit.minimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.minimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setDateTimeRange() PySide.QtGui.QDateTimeEdit.setDateRange() PySide.QtGui.QDateTimeEdit.setTimeRange() PySide.QtGui.QDateTimeEdit.clearMinimumDateTime() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.clearMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumTime() PySide.QtGui.QDateTimeEdit.clearMaximumTime()
This property holds the maximum time of the date time edit.
当设置此特性时, PySide.QtGui.QDateTimeEdit.minimumTime() is adjusted if necessary to ensure that the range remains valid. If the time is not a valid PySide.QtCore.QTime object, this function does nothing.
By default, this property contains a time of 23:59:59 and 999 milliseconds.
This property holds the minimum date of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumDate() is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid PySide.QtCore.QDate object, this function does nothing.
By default, this property contains a date that refers to September 14, 1752. The minimum date must be at least the first day in year 100, otherwise PySide.QtGui.QDateTimeEdit.setMinimumDate() 不起作用。
This property holds the minimum datetime of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid PySide.QtCore.QDateTime object, this function does nothing.
默认 PySide.QtGui.QDateTimeEdit.minimumDateTime() can be restored with PySide.QtGui.QDateTimeEdit.clearMinimumDateTime()
By default, this property contains a date that refers to September 14, 1752 and a time of 00:00:00 and 0 milliseconds.
另请参阅
PySide.QtGui.QDateTimeEdit.maximumDateTime() PySide.QtGui.QDateTimeEdit.minimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.minimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setDateTimeRange() PySide.QtGui.QDateTimeEdit.setDateRange() PySide.QtGui.QDateTimeEdit.setTimeRange() PySide.QtGui.QDateTimeEdit.clearMaximumDateTime() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.clearMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumTime() PySide.QtGui.QDateTimeEdit.clearMaximumTime()
This property holds the minimum time of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumTime() is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid PySide.QtCore.QTime object, this function does nothing.
默认情况下,此特性包含时间 00:00:00 和 0 毫秒。
| 返回类型: | PySide.QtGui.QDateTimeEdit.Section |
|---|
This property holds the current section of the spinbox setCurrentSection() .
| 返回类型: | PySide.QtCore.int |
|---|
This property holds the current section index of the spinbox.
If the format is ‘yyyy/MM/dd', the displayText is ‘2001/05/21' and the cursorPosition is 5 PySide.QtGui.QDateTimeEdit.currentSectionIndex() returns 1. If the cursorPosition is 3 PySide.QtGui.QDateTimeEdit.currentSectionIndex() is 0 etc.
setCurrentSection()
| 返回类型: | PySide.QtCore.QDate |
|---|
此特性保持 PySide.QtCore.QDate 是在 Widget 设置的。
By default, this property contains a date that refers to January 1, 2000.
| 参数: | date – PySide.QtCore.QDate |
|---|
| 返回类型: | PySide.QtCore.QDateTime |
|---|
此特性保持 PySide.QtCore.QDateTime that is set in the PySide.QtGui.QDateTimeEdit .
When setting this property the timespec of the PySide.QtGui.QDateTimeEdit remains the same and the timespec of the new PySide.QtCore.QDateTime 被忽略。
By default, this property contains a date that refers to January 1, 2000 and a time of 00:00:00 and 0 milliseconds.
| 参数: | date – PySide.QtCore.QDateTime |
|---|
| 参数: | text – unicode |
|---|---|
| 返回类型: | PySide.QtCore.QDateTime |
返回适当日期时间为给定 text .
This virtual function is used by the datetime edit whenever it needs to interpret text entered by the user as a value.
另请参阅
PySide.QtGui.QDateTimeEdit.textFromDateTime() PySide.QtGui.QDateTimeEdit.validate()
| 返回类型: | unicode |
|---|
This property holds the format used to display the time/date of the date time edit.
This format is the same as the one used described in QDateTime.toString() and QDateTime.fromString()
Example format strings (assuming that the date is 2nd of July 1969):
| 格式 | 结果 |
| dd.MM.yyyy | 02.07.1969 |
| MMM d yy | Jul 2 69 |
| MMMM d yy | July 2 69 |
Note that if you specify a two digit year, it will be interpreted to be in the century in which the date time edit was initialized. The default century is the 21 (2000-2099).
If you specify an invalid format the format will not be set.
另请参阅
QDateTime.toString() PySide.QtGui.QDateTimeEdit.displayedSections()
| 返回类型: | PySide.QtGui.QDateTimeEdit.Sections |
|---|
This property holds the currently displayed fields of the date time edit.
Returns a bit set of the displayed sections for this format. setDisplayFormat() , PySide.QtGui.QDateTimeEdit.displayFormat()
| 返回类型: | PySide.QtCore.QDate |
|---|
This property holds the maximum date of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.minimumDate() is adjusted if necessary to ensure that the range remains valid. If the date is not a valid PySide.QtCore.QDate object, this function does nothing.
By default, this property contains a date that refers to December 31, 7999.
| 返回类型: | PySide.QtCore.QDateTime |
|---|
This property holds the maximum datetime of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.minimumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid PySide.QtCore.QDateTime object, this function does nothing.
默认 PySide.QtGui.QDateTimeEdit.maximumDateTime() can be restored with PySide.QtGui.QDateTimeEdit.clearMaximumDateTime() .
By default, this property contains a date that refers to 31 December, 7999 and a time of 23:59:59 and 999 milliseconds.
另请参阅
PySide.QtGui.QDateTimeEdit.minimumDateTime() PySide.QtGui.QDateTimeEdit.minimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.minimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setDateTimeRange() PySide.QtGui.QDateTimeEdit.setDateRange() PySide.QtGui.QDateTimeEdit.setTimeRange() PySide.QtGui.QDateTimeEdit.clearMinimumDateTime() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.clearMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumTime() PySide.QtGui.QDateTimeEdit.clearMaximumTime()
| 返回类型: | PySide.QtCore.QTime |
|---|
This property holds the maximum time of the date time edit.
当设置此特性时, PySide.QtGui.QDateTimeEdit.minimumTime() is adjusted if necessary to ensure that the range remains valid. If the time is not a valid PySide.QtCore.QTime object, this function does nothing.
By default, this property contains a time of 23:59:59 and 999 milliseconds.
| 返回类型: | PySide.QtCore.QDate |
|---|
This property holds the minimum date of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumDate() is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid PySide.QtCore.QDate object, this function does nothing.
By default, this property contains a date that refers to September 14, 1752. The minimum date must be at least the first day in year 100, otherwise PySide.QtGui.QDateTimeEdit.setMinimumDate() 不起作用。
| 返回类型: | PySide.QtCore.QDateTime |
|---|
This property holds the minimum datetime of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid PySide.QtCore.QDateTime object, this function does nothing.
默认 PySide.QtGui.QDateTimeEdit.minimumDateTime() can be restored with PySide.QtGui.QDateTimeEdit.clearMinimumDateTime()
By default, this property contains a date that refers to September 14, 1752 and a time of 00:00:00 and 0 milliseconds.
另请参阅
PySide.QtGui.QDateTimeEdit.maximumDateTime() PySide.QtGui.QDateTimeEdit.minimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.minimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setDateTimeRange() PySide.QtGui.QDateTimeEdit.setDateRange() PySide.QtGui.QDateTimeEdit.setTimeRange() PySide.QtGui.QDateTimeEdit.clearMaximumDateTime() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.clearMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumTime() PySide.QtGui.QDateTimeEdit.clearMaximumTime()
| 返回类型: | PySide.QtCore.QTime |
|---|
This property holds the minimum time of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumTime() is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid PySide.QtCore.QTime object, this function does nothing.
默认情况下,此特性包含时间 00:00:00 和 0 毫秒。
| 参数: | index – PySide.QtCore.int |
|---|---|
| 返回类型: | PySide.QtGui.QDateTimeEdit.Section |
Returns the Section at index .
If the format is ‘yyyy/MM/dd', sectionAt(0) returns YearSection , sectionAt(1) returns MonthSection , and sectionAt(2) returns YearSection ,
| 返回类型: | PySide.QtCore.int |
|---|
This property holds the number of sections displayed. If the format is ‘yyyy/yy/yyyy', PySide.QtGui.QDateTimeEdit.sectionCount() returns 3.
| 参数: | section – PySide.QtGui.QDateTimeEdit.Section |
|---|---|
| 返回类型: | unicode |
Returns the text from the given section .
| 参数: | enable – PySide.QtCore.bool |
|---|
This property holds the current calendar pop-up showing mode..
The calendar pop-up will be shown upon clicking the arrow button. This property is valid only if there is a valid date display format.
| 参数: | calendarWidget – PySide.QtGui.QCalendarWidget |
|---|
设置给定 calendarWidget as the widget to be used for the calendar pop-up. The editor does not automatically take ownership of the calendar widget.
注意
PySide.QtGui.QDateTimeEdit.calendarPopup() must be set to true before setting the calendar widget.
| 参数: | section – PySide.QtGui.QDateTimeEdit.Section |
|---|
This property holds the current section of the spinbox setCurrentSection() .
| 参数: | index – PySide.QtCore.int |
|---|
This property holds the current section index of the spinbox.
If the format is ‘yyyy/MM/dd', the displayText is ‘2001/05/21' and the cursorPosition is 5 PySide.QtGui.QDateTimeEdit.currentSectionIndex() returns 1. If the cursorPosition is 3 PySide.QtGui.QDateTimeEdit.currentSectionIndex() is 0 etc.
setCurrentSection()
| 参数: | date – PySide.QtCore.QDate |
|---|
此特性保持 PySide.QtCore.QDate 是在 Widget 设置的。
By default, this property contains a date that refers to January 1, 2000.
| 参数: |
|
|---|
Convenience function to set minimum and maximum date with one function call.
setDateRange(min, max)
is analogous to:
setMinimumDate(min)
setMaximumDate(max)
If either min or max are not valid, this function does nothing.
另请参阅
PySide.QtGui.QDateTimeEdit.setMinimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.setMinimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.setMaximumTime() PySide.QtGui.QDateTimeEdit.clearMinimumTime() QDate.isValid()
| 参数: | dateTime – PySide.QtCore.QDateTime |
|---|
此特性保持 PySide.QtCore.QDateTime that is set in the PySide.QtGui.QDateTimeEdit .
When setting this property the timespec of the PySide.QtGui.QDateTimeEdit remains the same and the timespec of the new PySide.QtCore.QDateTime 被忽略。
By default, this property contains a date that refers to January 1, 2000 and a time of 00:00:00 and 0 milliseconds.
| 参数: |
|
|---|
Convenience function to set minimum and maximum date time with one function call.
setDateTimeRange(min, max)
is analogous to:
setMinimumDateTime(min)
setMaximumDateTime(max)
If either min or max are not valid, this function does nothing.
另请参阅
PySide.QtGui.QDateTimeEdit.setMinimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.setMinimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.setMaximumTime() PySide.QtGui.QDateTimeEdit.clearMinimumTime() QDateTime.isValid()
| 参数: | format – unicode |
|---|
This property holds the format used to display the time/date of the date time edit.
This format is the same as the one used described in QDateTime.toString() and QDateTime.fromString()
Example format strings (assuming that the date is 2nd of July 1969):
| 格式 | 结果 |
| dd.MM.yyyy | 02.07.1969 |
| MMM d yy | Jul 2 69 |
| MMMM d yy | July 2 69 |
Note that if you specify a two digit year, it will be interpreted to be in the century in which the date time edit was initialized. The default century is the 21 (2000-2099).
If you specify an invalid format the format will not be set.
另请参阅
QDateTime.toString() PySide.QtGui.QDateTimeEdit.displayedSections()
| 参数: | max – PySide.QtCore.QDate |
|---|
This property holds the maximum date of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.minimumDate() is adjusted if necessary to ensure that the range remains valid. If the date is not a valid PySide.QtCore.QDate object, this function does nothing.
By default, this property contains a date that refers to December 31, 7999.
| 参数: | dt – PySide.QtCore.QDateTime |
|---|
This property holds the maximum datetime of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.minimumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid PySide.QtCore.QDateTime object, this function does nothing.
默认 PySide.QtGui.QDateTimeEdit.maximumDateTime() can be restored with PySide.QtGui.QDateTimeEdit.clearMaximumDateTime() .
By default, this property contains a date that refers to 31 December, 7999 and a time of 23:59:59 and 999 milliseconds.
另请参阅
PySide.QtGui.QDateTimeEdit.minimumDateTime() PySide.QtGui.QDateTimeEdit.minimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.minimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setDateTimeRange() PySide.QtGui.QDateTimeEdit.setDateRange() PySide.QtGui.QDateTimeEdit.setTimeRange() PySide.QtGui.QDateTimeEdit.clearMinimumDateTime() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.clearMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumTime() PySide.QtGui.QDateTimeEdit.clearMaximumTime()
| 参数: | max – PySide.QtCore.QTime |
|---|
This property holds the maximum time of the date time edit.
当设置此特性时, PySide.QtGui.QDateTimeEdit.minimumTime() is adjusted if necessary to ensure that the range remains valid. If the time is not a valid PySide.QtCore.QTime object, this function does nothing.
By default, this property contains a time of 23:59:59 and 999 milliseconds.
| 参数: | min – PySide.QtCore.QDate |
|---|
This property holds the minimum date of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumDate() is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid PySide.QtCore.QDate object, this function does nothing.
By default, this property contains a date that refers to September 14, 1752. The minimum date must be at least the first day in year 100, otherwise PySide.QtGui.QDateTimeEdit.setMinimumDate() 不起作用。
| 参数: | dt – PySide.QtCore.QDateTime |
|---|
This property holds the minimum datetime of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid PySide.QtCore.QDateTime object, this function does nothing.
默认 PySide.QtGui.QDateTimeEdit.minimumDateTime() can be restored with PySide.QtGui.QDateTimeEdit.clearMinimumDateTime()
By default, this property contains a date that refers to September 14, 1752 and a time of 00:00:00 and 0 milliseconds.
另请参阅
PySide.QtGui.QDateTimeEdit.maximumDateTime() PySide.QtGui.QDateTimeEdit.minimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.minimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setDateTimeRange() PySide.QtGui.QDateTimeEdit.setDateRange() PySide.QtGui.QDateTimeEdit.setTimeRange() PySide.QtGui.QDateTimeEdit.clearMaximumDateTime() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.clearMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumTime() PySide.QtGui.QDateTimeEdit.clearMaximumTime()
| 参数: | min – PySide.QtCore.QTime |
|---|
This property holds the minimum time of the date time edit.
When setting this property the PySide.QtGui.QDateTimeEdit.maximumTime() is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid PySide.QtCore.QTime object, this function does nothing.
默认情况下,此特性包含时间 00:00:00 和 0 毫秒。
| 参数: | section – PySide.QtGui.QDateTimeEdit.Section |
|---|
Selects section 。若 section doesn't exist in the currently displayed sections this function does nothing. If section is NoSection this function will unselect all text in the editor. Otherwise this function will move the cursor and the current section to the selected section.
| 参数: | time – PySide.QtCore.QTime |
|---|
此特性保持 PySide.QtCore.QTime 是在 Widget 设置的。
默认情况下,此特性包含时间 00:00:00 和 0 毫秒。
| 参数: |
|
|---|
Convenience function to set minimum and maximum time with one function call.
setTimeRange(min, max)
is analogous to:
setMinimumTime(min)
setMaximumTime(max)
If either min or max are not valid, this function does nothing.
另请参阅
PySide.QtGui.QDateTimeEdit.setMinimumDate() PySide.QtGui.QDateTimeEdit.maximumDate() PySide.QtGui.QDateTimeEdit.setMaximumDate() PySide.QtGui.QDateTimeEdit.clearMinimumDate() PySide.QtGui.QDateTimeEdit.setMinimumTime() PySide.QtGui.QDateTimeEdit.maximumTime() PySide.QtGui.QDateTimeEdit.setMaximumTime() PySide.QtGui.QDateTimeEdit.clearMinimumTime() QTime.isValid()
| 参数: | spec – PySide.QtCore.Qt.TimeSpec |
|---|
This property holds the current timespec used by the date time edit..
| 参数: | dt – PySide.QtCore.QDateTime |
|---|---|
| 返回类型: | unicode |
This virtual function is used by the date time edit whenever it needs to display dateTime .
If you reimplement this, you may also need to reimplement PySide.QtGui.QDateTimeEdit.validate() .
另请参阅
PySide.QtGui.QDateTimeEdit.dateTimeFromText() PySide.QtGui.QDateTimeEdit.validate()
| 返回类型: | PySide.QtCore.QTime |
|---|
此特性保持 PySide.QtCore.QTime 是在 Widget 设置的。
默认情况下,此特性包含时间 00:00:00 和 0 毫秒。
| 参数: | date – PySide.QtCore.QTime |
|---|
| 返回类型: | PySide.QtCore.Qt.TimeSpec |
|---|
This property holds the current timespec used by the date time edit..