Hi Tim,<br><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 3:33 AM, Tim Sutton <span dir="ltr">&lt;<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
On Thu, Apr 19, 2012 at 11:28 AM, Tim Sutton &lt;<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>&gt; wrote:<br>
&gt; Hi<br>
&gt;<br>
&gt; On Thu, Apr 19, 2012 at 11:14 AM, Denis Rouzaud &lt;<a href="mailto:denis.rouzaud@gmail.com">denis.rouzaud@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I would try<br>
&gt;&gt; SIGNAL(&quot;layersWillBeRemoved(QStringList)&quot;)<br>
&gt;&gt;<br>
&gt;<br>
&gt; Oh but its not a string list that the signal is emitting but rather a<br>
&gt; QList of pointers to map layers?<br>
&gt;<br>
<br>
Oh sorry I see I was the source of confusion with my python snippet -<br>
yes it is the added slot I am interested in.<br></blockquote><div><br>I noticed that signal is already defined in the API:<br><br>void QgsMapLayerRegistry::layersWillBeRemoved (QStringList  theLayerIds)<br><br>Are you replacing or overloading it?<br>
<br>If you&#39;re overloading it, could PyQt be getting confused by seeing both signals as returning a list?<br><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

&gt;&gt; On 04/19/2012 11:09 AM, Tim Sutton wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi All<br>
&gt;&gt;<br>
&gt;&gt; Does anyone know the appropriate way to connect to the new<br>
&gt;&gt; QgsMapLayerRegistry signal I added in python:<br>
&gt;&gt;<br>
&gt;&gt; void layersAdded( QList&lt;QgsMapLayer *&gt; theMapLayers );<br>
&gt;&gt;<br>
&gt;&gt; I tried:<br>
&gt;&gt;<br>
&gt;&gt;             QtCore.QObject.connect(QgsMapLayerRegistry.instance(),<br>
&gt;&gt;<br>
&gt;&gt; QtCore.SIGNAL(&#39;layersWillBeRemoved(QList&lt;QgsMapLayer*&gt;)&#39;),<br>
&gt;&gt;                     self.getLayers)<br>
&gt;&gt;<br>
&gt;&gt; But that doesnt seem to be hitting my slot.<br>
<br>
</blockquote></div><br>