Results 1 to 2 of 2

Thread: Null for QDateEdit

  1. #1
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question Null for QDateEdit

    if I use QDateEdit, automaticaly I have a date value. Well, how to set "null" value for QDateEdit like setCurrentIndex(-1) in QComboBox ?
    I tried reimplement QDateEdit widget and set like this. But failed

    Qt Code:
    1. myDE::myDE(QWidget *parent)
    2. :QDateEdit(parent)
    3. {
    4. setCalendarPopup(true);
    5. calendarWidget()->setGridVisible(true);
    6. setDate(QDate::currentDate());
    7. setMaximumDate(QDate::currentDate());
    8.  
    9. QLineEdit *le=new QLineEdit();
    10. setLineEdit(le);
    11. le->clear();
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Null for QDateEdit

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QSqlTableModel and NULL
    By karas in forum Qt Programming
    Replies: 0
    Last Post: 9th February 2009, 12:55
  2. qextserialport taking value 0 as null ?
    By dheeraj in forum Qt Programming
    Replies: 4
    Last Post: 11th August 2008, 10:55
  3. How to terminate NULL character ?
    By merry in forum Qt Programming
    Replies: 3
    Last Post: 8th July 2008, 20:01
  4. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  5. checking for null
    By drkbkr in forum General Programming
    Replies: 6
    Last Post: 13th March 2006, 21:54

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.