Here's how to add a an item to the default context-menu that should do what you want:
...
self.spinFrameCountA = QtGui.QSpinBox()
self.spinFrameCountA.setRange(1,999999)
self.spinFrameCountA.setValue(40)
self.spinFrameCountA.installEventFilter(self)
self.spinFrameCountB = QtGui.QSpinBox()
self.spinFrameCountB.setRange(0,999999)
self.spinFrameCountB.setValue(6)
self.spinFrameCountB.installEventFilter(self)
...
def eventFilter(self, widget, event):
if (event.type() == QtCore.QEvent.ContextMenu and
isinstance(widget, QtGui.QSpinBox)):
menu = widget.lineEdit().createStandardContextMenu()
menu.addSeparator()
menu.addAction('Reset Value',
lambda: widget.setValue(widget.minimum()))
menu.exec_(event.globalPos())
menu.deleteLater()
return True
return QtGui.QWidget.eventFilter(self, widget, event)