[Tutor] what is the meaning of variable e

Steven D'Aprano steve at pearwood.info
Fri Apr 26 08:05:20 CEST 2013


On 26/04/13 15:45, wang yong wrote:
> Hi tutors,
>
> I am a newb. Please bear with my simple question. Please refer to the code
> as following. The question is: what is the special meaning of 'e' variable
> in the class of 'Button'.


'e' is the argument to the dragEnterEvent and dropEvent methods. You will
need to read the PyQt4 documentation to find out what sort of argument
those two methods receive, but my guess is that they are GUI events.


> The second one is how function 'dragEnterEvent'
> and 'dropEvent' got executed with calling from class 'example'.

The PyQt4 library automatically calls them when the user drags something
onto the button with the mouse.




-- 
Steven


More information about the Tutor mailing list