In this article we will see how we can set/change the date edit accept delay property of the QCalendarWidget. This property holds the time an inactive date edit is shown before its contents are accepted. If the calendar widget’s date edit is enabled, this property specifies the amount of time (in millseconds) that the date edit remains open after the most recent user input. Once this time has elapsed, the date specified in the date edit is accepted and the popup is closed. By default, the delay is defined to be 1500 milliseconds (1.5 seconds).
The date edit pop-up appear when we try to select using keyboard, the lesser the value of delay pop-will get closed more quickly
In order to do this we will use
setDateEditAcceptDelaymethod with the QCalendarWidget object.
Syntax : calendar.setDateEditAcceptDelay(n)
Argument : It takes integer argument
Return : It return None
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- PyQt5 QCalendarWidget - Getting Date Edit (Pop-Up) Accept Delay
- PyQt5 QCalendarWidget - Setting Edit Focus Property
- PyQt5 QCalendarWidget - Setting accept drops property
- PyQt5 QCalendarWidget - Enabling/Disabling Date Edit Pop-Up
- PyQt5 QCalendarWidget - Checking if Date Edit Pop-Up is enabled or disabled
- PyQt5 QCalendarWidget - Checking Edit Focus Property
- PyQt5 QListWidget - Setting Edit Trigger Property
- PyQt5 QCalendarWidget - Getting accept drops property
- PyQt5 QCommandLinkButton - Setting Auto Repeat Delay Time
- PyQt5 QCalendarWidget - Setting date Range
- PyQt5 QCalendarWidget - Setting Minimum Date
- PyQt5 QCalendarWidget - Setting Maximum Date
- PyQt5 QCalendarWidget - Setting Selected Date
- PyQt5 QCalendarWidget - Setting Date Text Format
- PyQt5 QCalendarWidget - Setting Text to the selected date
- PyQt5 - Setting line edit to the ComboBox
- PyQt5 - Setting font to the item in line edit box of ComboBox
- PyQt5 QDoubleSpinBox – Setting Line Edit to it
- Python VLC MediaPlayer – Setting Subtitle Delay
- Python VLC MediaPlayer –Setting Audio Delay
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.