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. How to get a initial date, end date in QCalendarWidget
Forum Updated to NodeBB v4.3 + New Features

How to get a initial date, end date in QCalendarWidget

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 1.1k 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.
  • D Offline
    D Offline
    david_aa
    wrote on last edited by
    #1

    Hi all,

    I need to get the initial date, end date and concatenate them, how can I do this?

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      What do you mean "initial date, end date"?
      "concatenate them" - do you mean concatenate string representations of the dates or concatenate QDate classes?

      1 Reply Last reply
      0
      • JeroentjehomeJ Offline
        JeroentjehomeJ Offline
        Jeroentjehome
        wrote on last edited by
        #3

        end date:
        @
        calendar->setMaximumDate(QDate(2006, 7, 3));
        @
        Initial date:
        @
        QDate myStartDate(calendar->selectedDate ());
        @
        What do you want with the concatenate the dates?

        Greetz, Jeroen

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Hope you are asking for initial date and end dates of QCalendarWIdget instance itself. You can look at the maximumDate and minimumDate() method. Both return QDate. You can QDate.toString() get the string and concanate them.

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          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