Results 1 to 2 of 2

Thread: (PyQt5) QDateEdit write date from the keyboard

  1. #1
    Join Date
    Jan 2021
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question (PyQt5) QDateEdit write date from the keyboard

    Is there any way to write the date to the widget without double clicking on it? I tried to clear the widget when clicked, but QDateEdit has no such slot.

    Thanks in advance for your attention

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: (PyQt5) QDateEdit write date from the keyboard

    Is there any way to write the date to the widget without double clicking on it? I tried to clear the widget when clicked, but QDateEdit has no such slot.
    I have no idea what you mean by this. The base class for QDateEdit, QDateTimeEdit has a clear() method, as well as setDate(), setTime() and setDateTime() methods (slots). QDate has a static currentDate() method to retrieve today's date.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 7
    Last Post: 4th July 2019, 06:15
  2. QDateedit date changes on mouse press
    By anbu01 in forum Newbie
    Replies: 2
    Last Post: 15th January 2017, 01:51
  3. Replies: 1
    Last Post: 3rd May 2014, 17:46
  4. QDateEdit and date returned
    By cydside in forum Qt Programming
    Replies: 17
    Last Post: 26th May 2009, 22:08
  5. QDateEdit and empty date
    By vieraci in forum Qt Programming
    Replies: 1
    Last Post: 3rd November 2007, 17:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.