Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [SOLVED]Date/Time Edit can not set value 1390 for year

    General and Desktop
    2
    5
    1145
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mehdi.nine last edited by

      Hi, i want to set 1390 for year in Date/Time edit. how can i do that? i want to remove enforce from that. is it possible?

      1 Reply Last reply Reply Quote 0
      • D
        dbzhang800 last edited by

        Hi,
        Do you mean that 1389 and 1391 works for you?

        1 Reply Last reply Reply Quote 0
        • M
          mehdi.nine last edited by

          Hi, no 1389 and 1391 Not work. i want to work that. i use qt 5.0.1

          1 Reply Last reply Reply Quote 0
          • D
            dbzhang800 last edited by

            By default, this property minimumDate contains a date that refers to September 14, 1752,

            So, some code like this should work.
            @
            QDateTimeEdit w;
            w.setMinimumDate(QDate(100,1,1));
            w.setDate(QDate(1390,1,1));
            @

            1 Reply Last reply Reply Quote 0
            • M
              mehdi.nine last edited by

              thanks. it worked.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post