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. Set a date range of selectable days for a whole year regardless of what the current year is using the QCalendarwidget
Qt 6.11 is out! See what's new in the release blog

Set a date range of selectable days for a whole year regardless of what the current year is using the QCalendarwidget

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.8k 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.
  • F Offline
    F Offline
    fs_tigre
    wrote on last edited by
    #1

    Hi,

    I'm trying to determine the best way to set a date range based on what the user entered and has been saved to a file for future reference. In other words I want to set a range of selectable days for a whole year regardless of what the current year is, for instance, if the user entered date 01-02-2011, I want the selectable days to be from 01-02-2013 to 01-02-2014.

    What would be the best way to accomplished what I'm describing above?

    Thanks a lot.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You might be interested by Andre's "QTimeSpan":https://gitorious.org/qtimespandevel

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fs_tigre
        wrote on last edited by
        #3

        Thank you for your reply.

        I downloaded the class you suggested but it looks like it hasn't been converted to work with Qt5 since I got a bunch of errors when I tried to run the test qtimespan.

        Apparently things like the one I'm trying to do, don't have an easy solution with the existing classes availables in Qt, correct? I will look into QTimeSpan a little more and see if I can make it work in Qt5.

        Thanks a lot

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          AFAIK Andre wants to get it in Qt 5 but I don't know he's roadmap

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • F Offline
            F Offline
            fs_tigre
            wrote on last edited by
            #5

            Oh, that would be cool I hope that eventually happens. Thanks a lot for your help!

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              It should yes.

              You're welcome !

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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