<div dir="ltr">During the porting of a plugin to QGIS 3.x I'm facing the following when using Qgs* objects' signals (it doesn't happen with Qt widgets, etc.).<div>I'm using QGIS 3.4 on Window 10.<br><div><br></div><div>If I have a Python class like the following:</div><div><br></div><div>>class Foo():<br></div><div>>  def __init__(self):</div>>    QgsProject.instance().writeProject.connect(self.written)<div>> </div><div>>  def written(self, dom):</div><div>>    (do something)</div><div><br></div><div>self.written is never called. The signal can only connected to unbound methods, e.g. to a top level def function or a class method. If I write:</div><div><br></div><div>>class Foo():</div><div>>  def __init__(self):</div>>    QgsProject.instance().writeProject.connect(Foo.written)<div>> </div><div>>  def written(dom):</div><div>>    (do something)</div><div><br></div><div>it works, but in general I cannot make make all my methods class methods of course!</div><div><br></div><div>I've also tried making Foo derive from QObject. I've also tried decorating "def writter" as a pyQtSlot, but nothing worked.</div><div><br></div><div>Is it only me, is it expected or is it a (known) bug?</div></div><div>In case it's the expected behaviour I wonder I the old classe signals like I  used to write:</div><div><br></div>>QObject.connect(QgsProject.instance(),SIGNAL('writeProject (QDomDocument &)'),self.written)<div><br></div><div>could be ported to QGIS 3</div><div><br></div><div>Cheers,</div><div>Giovanni</div></div>