Results 1 to 3 of 3

Thread: Minimum date change

  1. #1
    Join Date
    Jul 2006
    Location
    Atlanta, GA
    Posts
    86
    Thanks
    26
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face Minimum date change

    Is there a way to change the minimum date for QDateEdit? I am building a database of all my music scores and books. A lot of the composer's birth and death dates are before 1752, the current minumum. Would I have to edit the qdatetimeedit.cpp and .h files and then recompile QT? I hope not, I don't really feel comfortable doing that, but if need be, I will.

    Thanks in advance for any advice.


    fnmblot
    fnmblot
    --------------------------------------
    Gee Ricky, I'm sorry your mom blew up.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Minimum date change

    As the docs say:
    Note that QDate should not be used for date calculations for dates prior to the introduction of the Gregorian calendar. This calendar was adopted by England from the 14 September 1752 (hence this is the earliest valid QDate), and subsequently by most other Western countries, by 1923. The latest valid date within this scheme is 31 December 7999.
    You will have to implement your own QDate (or change Qt sources).

    See this:
    http://www.qtcentre.org/forum/f-qt-p...time-1410.html
    but beware that there is a difference between time used by astronomers and historians.

  3. #3
    Join Date
    Jul 2006
    Location
    Atlanta, GA
    Posts
    86
    Thanks
    26
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: Minimum date change

    I did see that post, I don't need to go that far back in time. I guess I could always create a QLineEdit with a validator of something like MM/DD/YYYY. That would probably be better. Because who knows when leap years and all that crap were back in J.S. Bach's day. Did they even have leap year back then? Oh well.

    Thanks a million folks.

    fnmblot
    fnmblot
    --------------------------------------
    Gee Ricky, I'm sorry your mom blew up.

Similar Threads

  1. Change background color of QPushButton
    By gtthang in forum Qt Programming
    Replies: 3
    Last Post: 26th November 2013, 10:23
  2. Can't change the text display of a QTreeview item.
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 2nd June 2006, 01:03
  3. change of ownershiip operation not permaitted while build
    By quickNitin in forum Installation and Deployment
    Replies: 5
    Last Post: 16th May 2006, 12:13
  4. QT4 minimum requirements Debian GNU/Linux Sarge
    By Everall in forum Installation and Deployment
    Replies: 10
    Last Post: 21st February 2006, 12:21
  5. Working with Date type in database applications
    By kolach in forum Qt Programming
    Replies: 13
    Last Post: 25th January 2006, 14:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.