[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] TypeError: nativeEvent() missing 1 required positional argument: 'result'
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2014-07-26 7:44:51
Message-ID: c7414ae4508691bf6364154598ca08e7 () www ! riverbankcomputing ! com
[Download RAW message or body]
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
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic