Hi Tim,<br><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 3:33 AM, Tim Sutton <span dir="ltr"><<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>></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 <<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>> wrote:<br>
> Hi<br>
><br>
> On Thu, Apr 19, 2012 at 11:14 AM, Denis Rouzaud <<a href="mailto:denis.rouzaud@gmail.com">denis.rouzaud@gmail.com</a>> wrote:<br>
>> I would try<br>
>> SIGNAL("layersWillBeRemoved(QStringList)")<br>
>><br>
><br>
> Oh but its not a string list that the signal is emitting but rather a<br>
> QList of pointers to map layers?<br>
><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'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">
>> On 04/19/2012 11:09 AM, Tim Sutton wrote:<br>
>><br>
>> Hi All<br>
>><br>
>> Does anyone know the appropriate way to connect to the new<br>
>> QgsMapLayerRegistry signal I added in python:<br>
>><br>
>> void layersAdded( QList<QgsMapLayer *> theMapLayers );<br>
>><br>
>> I tried:<br>
>><br>
>> QtCore.QObject.connect(QgsMapLayerRegistry.instance(),<br>
>><br>
>> QtCore.SIGNAL('layersWillBeRemoved(QList<QgsMapLayer*>)'),<br>
>> self.getLayers)<br>
>><br>
>> But that doesnt seem to be hitting my slot.<br>
<br>
</blockquote></div><br>