Solved Disable editing in QDateEdit
-
I use the QDateEdit widget. I would like to choose data from popup calendar only - I am not be able to disable the edit box.
-
Of course - thanks a lot
-
@Milosz Use https://doc.qt.io/qt-5/qabstractspinbox.html#lineEdit to get the line edit widget and call setDisabled(true) on it.
-
But the lineEdit is protected
-
@Milosz You're right. Then you will need to subclass QDateEdit.
-
Of course - thanks a lot
-
Hi
What about its ReadOnly property?
dateEdit->setReadOnly(true);