Hi,Algis,many thanks for all these informations.<div>At first I thought QtCore.QtObject.connect as static method of QtObject,later I realized that,this is py style of calling super method.</div><div>That's why I asked question (3).</div>
<div>The document of pyqt says "The code (or component) that emits the signal does not know or care if the signal is being used."<br></div><div>In my head,the implementation of signal and slot is an observer pattern.</div>
Pseudo-code:<div>def connect(source,signal,slot):<br><div> if(not source.slots[signal]):</div><div> source.slots[signal] = []</div><div> source.slots[signal].append(slot)</div><div><br></div><div>def emit(signal,param):</div>
<div> for slot in self.slots[signal]:</div><div> slot(param)</div><div>I am wondering why signal does not know what slots bind with it?</div><div><br></div><div>Best regards,<br><div><br><div class="gmail_quote">
On Sun, Sep 19, 2010 at 4:32 PM, Algis Kabaila <span dir="ltr"><<a href="mailto:akabaila@pcug.org.au">akabaila@pcug.org.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sunday 19 September 2010 17:41:59 Von wrote:<br>
</div><div class="im">> Hi,Algis,<br>
> I have looked through this chapter "Events, the Clipboard, and Drag and<br>
> Drop", and I couldn't find anything about signal/slot mechanism.<br>
><br>
</div><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#new-style-
signal-and-slot-support" target="_blank">http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#new-style-<br>
signal-and-slot-support</a><br>
<br>
(One line URL!)<br>
Chapter 7 of the PyQt4 Reference discusses the Signals/Slots in some detail.<br>
Good, clear and detailed explanation!<br>
<div><div></div><div class="h5"><br>
Al.<br>
--<br>
OldAl<br>
<a href="mailto:akabaila@pcug.org.au">akabaila@pcug.org.au</a><br>
</div></div></blockquote></div><br></div></div></div>