Given the following code:
Qt Code:
  1. QDate test( 2009, 2, 10 );
  2.  
  3. qDebug( ) << test.toJulianDay( ) << " " << QDate::fromJulianDay( 41 );
To copy to clipboard, switch view to plain text mode 

I would expect the results to be:
41 QDate( "Sat Feb 10 -4713" )

Instead I get the results
2452873 QDate( "Sun Feb 11 -4713" )

I know this result is not correct and I have submitted a bug to the Trolls (or is it Nokias now?). Here is a quick workaround, if you know the Julian Day:

Qt Code:
  1. QDate test( 2009, 1, 1 );
  2. test = test.addDays( julianDate - 1 );
To copy to clipboard, switch view to plain text mode