Results 1 to 4 of 4

Thread: QDateTimeEdit

  1. #1
    Join Date
    Oct 2007
    Posts
    78
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QDateTimeEdit

    When sub classing QLineEdit I can use functions such as hasSelectedText(), isUndoAvailable() to re implement copy,undo, etc functions for a contextMenuEvent.

    Sub classing QDateTimeEdit I can not find any of these functions or something I can re implement from an inherited object.

    QDateTimeEdit does have these functions in its default context menu so I am not sure where I am missing the connection.

    Bob

  2. #2
    Join Date
    Jan 2006
    Location
    Socorro, NM, USA
    Posts
    29
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QDateTimeEdit

    You are not missing anything. QDateTimeEdit does not inherit QLineEdit. Therefore the mentioned methods are not available.
    There are 10 people in the world. Those who understand binary and those who don't.

  3. #3
    Join Date
    Oct 2007
    Posts
    78
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QDateTimeEdit

    But it still offers such features as copy,paste,etc from its context menu. So my guess is it implements the functionality somewhere?

  4. #4
    Join Date
    Jan 2006
    Location
    Socorro, NM, USA
    Posts
    29
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: QDateTimeEdit

    I would suppose so. It inherits QAbstractSpinBox which in turn inherits Qwidget. Both show some events. Probably the best place to look at is the source code of QDateTimeEdit.
    There are 10 people in the world. Those who understand binary and those who don't.

Similar Threads

  1. Highlighting selected section on QDateTimeEdit
    By Yorma in forum Qt Programming
    Replies: 4
    Last Post: 3rd May 2013, 12:03
  2. new design of QDateTimeEdit
    By Ursa in forum Qt Programming
    Replies: 2
    Last Post: 12th December 2007, 07:30
  3. QDateTimeEdit
    By dkite in forum Qt Programming
    Replies: 2
    Last Post: 10th September 2006, 19:12

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.