-
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
-
Re: QDateTimeEdit
You are not missing anything. QDateTimeEdit does not inherit QLineEdit. Therefore the mentioned methods are not available.
-
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?
-
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.