[Interest] qdateedit

Rene Decartes rene.decartes.too at gmail.com
Thu Oct 1 21:56:15 CEST 2015


hello,

i am using qt5.5 and having problems with same. there are two difficulties:
a) while qDate has a "... range of valid dates is from January 2nd, 4713 BCE, to sometime in the year 11 million CE.", qDateEdit setMinimumDate documentation say "minimum date must be at least the first day in year 100, otherwise setMinimumDate() has no effect." is there a way around this contradiction?

b) when the calendar popup comes up, changing the month via the drop-down has no effect. on the other hand, using the "arrow" keys to either side of the month will change the month.

this is the code that i am using...

#dfine MINDATE QDate( -99 , 1 , 1 )

    eventDateEdit = new QDateEdit( this ) ;
    eventLabel = new QLabel( tr( "&Event:" ) ) ;
    eventLabel->setBuddy( eventDateEdit ) ;
    eventDateEdit->setCalendarPopup( true ) ;
    eventDateEdit->setDate( today ) ;
    eventDateEdit->setMinimumDate( MINDATE ) ;
    eventDateEdit->setDisplayFormat( "yyyy MMMM d" ) ;


-- 
rene

There are 10 kinds of people. Those who understand binary code, and those who do not.



More information about the Interest mailing list