Class: QgsDateTimeWithTimeZoneWidget¶
A date time widget with time zone control.
Added in version 4.4.
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Constructor
Methods
Returns the date time shown in the widget, with corresponding time zone set. |
|
Returns the date time edit portion of the widget. |
|
Returns the title for the time zone selector dialog window. |
|
Sets the date time to show in the widget. |
|
Sets the title for the time zone selector dialog window. |
|
Returns the time zone combo box portion of the widget. |
Signals
Emitted whenever the date time shown in the widget is changed. |
- class qgis.gui.QgsDateTimeWithTimeZoneWidget[source]¶
Bases:
QWidget- __init__(parent: QWidget | None = None)¶
Constructor for QgsDateTimeWithTimeZoneWidget, with the specified
parentwidget.- Parameters:
parent (QWidget|None = None)
- dateTime(self) QDateTime[source]¶
Returns the date time shown in the widget, with corresponding time zone set.
See also
- Return type:
QDateTime
- signal dateTimeChanged(dateTime: QDateTime)[source]¶
Emitted whenever the date time shown in the widget is changed.
- Parameters:
dateTime (QDateTime)
- dateTimeEdit(self) QgsDateTimeEdit | None[source]¶
Returns the date time edit portion of the widget.
Warning
Do not directly set or retrieve the date time from this widget, as it will not respect the time zone portion of the widget.
- Return type:
QgsDateTimeEdit|None
- dialogTitle(self) str[source]¶
Returns the title for the time zone selector dialog window.
See also
- Return type:
str
- setDateTime(self, dateTime: QDateTime | datetime.datetime)[source]¶
Sets the date time to show in the widget.
The time zone will be automatically set to match the time zone of this date time value.
See also
- Parameters:
dateTime (QDateTime|datetime.datetime)
- setDialogTitle(self, title: str | None)[source]¶
Sets the
titlefor the time zone selector dialog window.See also
- Parameters:
title (str|None)
- timeZoneComboBox(self) QgsTimeZoneComboBox | None[source]¶
Returns the time zone combo box portion of the widget.
- Return type:
QgsTimeZoneComboBox|None