I need to set empty value to datetimeedit widget (01.01.00 0:00 is not really what I want to see). Using dtwidget.setDateTime(QDateTime()) or dtwidget.clear() is not affected. How can I do this?
Short answer is No you cannot.
Here's the long answer.
You cannot set the date to 00.00.0000 00:00. Because it makes no damn sense. By default, it shows an unknwon date-time as 12:00 AM of the first day of the first month of year 0000.
If you really badly want to show "00.00.00 0:00", then do this: dt.setDisplayFormat( "00.00.00 0:00" ). What's the problem with this? Yeah, it shows 00.00.00 0:00 for any date-time you set. You'll have to set a sensible format once the user starts interacting with your widget or you want to set a valid date-time.
So you want some crappy behaviour from standard Qt widgets, subclass them and implement your own code.
How to clear value in QDateTimeEdit?