Class: QgsTimeEdit

class qgis.gui.QgsTimeEdit(parent: QWidget = None)

Bases: QgsDateTimeEdit

Constructor for QgsTimeEdit. The current time is used by default. The widget is allowing null by default. If allow null is disabled, you should check allowNull before getting values from the widget.

The QgsTimeEdit class is a QTimeEdit widget with the capability of setting/reading null date/times.

Warning

You should use the signal valueChanged of this subclass rather than QDateTimeEdit.timeChanged. (If you consequently connect parent’s timeChanged signal and call time() afterwards there is no guarantee that NULL values will be correctly handled).

See also

QgsDateTimeEdit

See also

QgsDateEdit

New in version 3.14.

Parameters

parent

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
dateTimeFromText()
destroy()
disconnectNotify()
displayNull()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
emitValueChanged(self, value: Any)
Parameters

value (Any) –

enterEvent()
fixup()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
initStyleOption()
inputMethodEvent()
isNull()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
lineEdit()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setLineEdit()
setTime(self, time: Union[QTime, datetime.time])

Sets the time for the widget and handles null times.

Note

Since QDateTimeEdit.setTime() is not virtual, setTime must be called for QgsTimeEdit.

Parameters

time (Union[QTime) –

sharedPainter()
showEvent()
stepEnabled()
tabletEvent()
textFromDateTime()
timeValueChanged

Signal emitted whenever the time changes. [signal]

Parameters

time (Union[QTime) –

timerEvent()
updateMicroFocus()
validate()
wheelEvent()