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] QDateEdit Calendar PoP Up issue.
Qt 6.11 is out! See what's new in the release blog

[solved] QDateEdit Calendar PoP Up issue.

Scheduled Pinned Locked Moved General and Desktop
8 Posts 5 Posters 7.9k 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.
  • R Offline
    R Offline
    Rahul Das
    wrote on last edited by
    #1

    Hi All,

       Is there any way to pop up the calendar with out using mouse? What i was trying to do is, A form in which user fills his data. While filling the date, the calendar automatically pops up. I am not able to do this. 
    

    However, when DateEdit is clicked, it pops up, but not just with keys.


    Declaration of (Platform) independence.

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

      Guessing here; please consult the Qt sources to verify:

      QDateEdit shows a line edit with a small button inside it, right? And pressing that button, will show the popup, very much like a QCombobox.

      My guess is, that QDateEdit actually uses a button widget for the button. If so, are able to get a pointer to the button: it will be the only QAbstractButton type child of the QDateEdit. Once you have that one, you can use it's click() method... That should popup the calendar, I think.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rahul Das
        wrote on last edited by
        #3

        bq. very much like a QCombobox.

        Thanks andre, Looks like it is "QAbstractSpinBox":http://doc.qt.nokia.com/latest/qabstractspinbox.html


        Declaration of (Platform) independence.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Looks like you are right; QAbstractSpinBox is the base class. And, that one does draw the up and down buttons itself. So, my idea above is not going to work out for you. Sorry!

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            it has some slots:

            *void stepDown ()

            • void stepUp ()

            Which you could try to use programatically.

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rahul Das
              wrote on last edited by
              #6

              bq. it has some slots:
              *void stepDown ()
              void stepUp ()

              so as stepBy(int). Thank you. Will try with this.


              Declaration of (Platform) independence.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                deepakberiwal
                wrote on last edited by
                #7

                @Rahul:
                I am also working on the same requirement. Can you provide me with the snap shot of your code so that I can also implement the same.

                Thanks in Advance

                1 Reply Last reply
                0
                • raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #8

                  you could also do this like i "posted here":http://qt-project.org/forums/viewthread/27361#123861.

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  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