I want to be able to use a custom contextMenu in a QDoubleSpinBox. So it seemed the best way to do that is to sublass a QDoubleSpinBox and subclass a QLineEdit.

Using the sub classed QLineEdit to create my contextMenu needs as well as QValidator etc.

Using
Qt Code:
  1. setLineEdit()
To copy to clipboard, switch view to plain text mode 
to set my custom QLineEdit in my custom QDoubleSpinBox does not appear to provide the result I was looking for.

Using lineEdit() shows that my custom QLineEdit is installed but I am not getting my custom contextMenu.

Is this the wrong approach?

Bob