Hi,Algis,many thanks for all these informations.
At first I thought QtCore.QtObject.connect as static method of
QtObject,later I realized that,this is py style of calling super method.
That's why I asked question (3).
The document of pyqt says "The code (or component) that emits the signal
does not know or care if the signal is being used."
In my head,the implementation of signal and slot is an observer pattern.
Pseudo-code:
def connect(source,signal,slot):
    if(not source.slots[signal]):
        source.slots[signal] = []
    source.slots[signal].append(slot)

def emit(signal,param):
    for slot in self.slots[signal]:
        slot(param)
I am wondering why signal does not know what slots bind with it?

Best regards,

On Sun, Sep 19, 2010 at 4:32 PM, Algis Kabaila <akaba...@pcug.org.au> wrote:

> On Sunday 19 September 2010 17:41:59 Von wrote:
> > Hi,Algis,
> > I have looked through this chapter "Events, the Clipboard, and Drag and
> > Drop", and I couldn't find anything about signal/slot mechanism.
> >
>
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#new-style-
> signal-and-slot-support
>
> (One line URL!)
> Chapter 7 of the PyQt4 Reference discusses the Signals/Slots in some
> detail.
> Good, clear and detailed explanation!
>
> Al.
> --
> OldAl
> akaba...@pcug.org.au
>
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to