[PyQt] TypeError: nativeEvent() missing 1 required positional argument: 'result'
Phil Thompson
phil at riverbankcomputing.com
Sat Jul 26 08:44:51 BST 2014
On 25/07/2014 11:11 pm, Alan Ezust wrote:
> I'm trying to override and call the base class version of
> QWidget.nativeEvent() and just print out
> what is happening.
>
> I am having difficulty understanding how to pass a long* as result.
> And calling it via super() gives me this strange message:
>
> TypeError: nativeEvent() missing 1 required positional argument:
> 'result'
>
> def nativeEvent(self, eventType, message, result):
> retval = super(QWidget, self).nativeEvent(eventType, message,
> result)
> print ("nativeevent: %s %s" % (eventType, message))
> return retval
>
> What am I doing wrong?
The "result" is an output not an input, so...
def nativeEvent(self, eventType, message):
retval, result = super().nativeEvent(eventType, message)
return retval, result
Phil
More information about the PyQt
mailing list