<div dir="ltr">Hi Baz, Hi Phil, Hi List,<br><div class="gmail_extra"><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

This actually only relates to multiple-inheritance. It should never be problem for true mixin classes.<br></blockquote><div><br></div><div style>There you're certainly right. It's calling super() where I have my</div>
<div style>issues. Your examples did not call super(), so the MRO doesn't</div><div style>matter.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
The one genuine issue with mixins in PyQt, is that you cannot inherit custom signals.<br><div class=""><div class="h5"><span style="color:rgb(34,34,34)"></span></div></div></blockquote><div><br></div><div style>Then it might be interesting for you that with my patch applied, it</div>
<div style>does work. For example:</div><div style><br></div><div style>-----------------------------------------------------------------------</div><div style>from PyQt4.QtGui import QWidget, QLabel, QApplication</div><div>
from PyQt4.QtCore import pyqtSignal, QObject</div><div><br></div><div>class A(QObject):</div><div>    a = pyqtSignal(str)</div><div><br></div><div><br></div><div>class B(A, QLabel):</div><div>    b = pyqtSignal(str)</div>
<div><br></div><div>class Printer(QObject):</div><div>    def print(self, a):</div><div>        print(a)</div><div><br></div><div>app = QApplication([])</div><div><br></div><div>b = B()</div><div>p = Printer()</div><div>b.a.connect(p.print)</div>
<div>b.b.connect(p.print)</div><div>b.a.emit('a')</div><div>b.b.emit('b')</div><div>b.setText('foo')</div><div>----------------------------------------------------------------------</div><div><br></div>
<div style>correctly works with my patch applied. It does not if you let A</div><div style>inherit from object.</div><div style><br></div><div style>I thought that this is because QObject has a special metaclass</div><div style>
which does something to the signals, but replacing the definition</div><div style>of A with class A(object, metaclass=QObject.__class__)</div><div style>interestingly did not help.</div><div style><br></div><div style>Btw, why is it called pyqtSignal and not just signal, for those</div>
<div style>in need for details they could just write QtCore.signal</div><div style><br></div><div style>Greetings</div><div style><br></div><div style>Martin</div></div>
</div></div>