[PyQt] Re: How to override mousePressEvent for an existing
QPushButton widget
Dov Grobgeld
dov.grobgeld at gmail.com
Thu Jul 30 06:23:41 BST 2009
I wrote:
> [stuff deleted]
>
> This is actually related to another even more fundamental question, why is
> the difference between overriding and connecting? I.e. why is "clicked" a
> signal and "mousePressEvent" an overrided virtual. Why can't they both be
> signals, in which case the problem I describe wouldn't happen? (That's how
> it works in Gtk, btw.)
>
I realized that the wording above is both unfortunate and wrong. I
understand that there is a need for virtual functions, and Gtk indeed
provides them as well. But what is less clear to me is why there is a
distinction between "clicked" and "mousePressEvent", and why they are
implemented differently? Anyhow, that has nothing to do with the Py part of
PyQt which simply reflects the underlying API.
Dov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090730/5b8beec8/attachment.html
More information about the PyQt
mailing list