Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]Date/Time Edit can not set value 1390 for year
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.4k Views 1 Watching
  • 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 Offline
    M Offline
    mehdi.nine
    wrote on last edited by
    #1

    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
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mehdi.nine
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dbzhang800
          wrote on last edited by
          #4

          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
          0
          • M Offline
            M Offline
            mehdi.nine
            wrote on last edited by
            #5

            thanks. it worked.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved