In this article we will see how we get the read-only property of date edit. By default when we create a date edit it is editable although we can make it read-only. In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text but cannot edit it. In order to make the date edit read-only we use
In order to do this we use
isReadOnly method with the QDateEdit object
Syntax : date.isReadOnly()
Argument : It takes no argument
Return : It returns bool
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.