Hi On Thu, Apr 19, 2012 at 7:12 PM, Larry Shaffer <[email protected]> wrote: > Sorry for extending the confusion. I now understand you were referring to > the layersAdded signal. >
Thanks for the ideas - I got it working using the @pyqtslot decorator instead of the older @pyqtsignature decorator. Regards Tim > Larry > > > > > On Thu, Apr 19, 2012 at 11:03 AM, Larry Shaffer <[email protected]> > wrote: >> >> Hi Tim, >> >> On Thu, Apr 19, 2012 at 3:33 AM, Tim Sutton <[email protected]> wrote: >>> >>> Hi >>> >>> On Thu, Apr 19, 2012 at 11:28 AM, Tim Sutton <[email protected]> wrote: >>> > Hi >>> > >>> > On Thu, Apr 19, 2012 at 11:14 AM, Denis Rouzaud >>> > <[email protected]> wrote: >>> >> I would try >>> >> SIGNAL("layersWillBeRemoved(QStringList)") >>> >> >>> > >>> > Oh but its not a string list that the signal is emitting but rather a >>> > QList of pointers to map layers? >>> > >>> >>> Oh sorry I see I was the source of confusion with my python snippet - >>> yes it is the added slot I am interested in. >> >> >> I noticed that signal is already defined in the API: >> >> void QgsMapLayerRegistry::layersWillBeRemoved (QStringList theLayerIds) >> >> Are you replacing or overloading it? >> >> If you're overloading it, could PyQt be getting confused by seeing both >> signals as returning a list? >> >> >>> >>> >> On 04/19/2012 11:09 AM, Tim Sutton wrote: >>> >> >>> >> Hi All >>> >> >>> >> Does anyone know the appropriate way to connect to the new >>> >> QgsMapLayerRegistry signal I added in python: >>> >> >>> >> void layersAdded( QList<QgsMapLayer *> theMapLayers ); >>> >> >>> >> I tried: >>> >> >>> >> QtCore.QObject.connect(QgsMapLayerRegistry.instance(), >>> >> >>> >> QtCore.SIGNAL('layersWillBeRemoved(QList<QgsMapLayer*>)'), >>> >> self.getLayers) >>> >> >>> >> But that doesnt seem to be hitting my slot. >>> >> > > > _______________________________________________ > Qgis-developer mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/qgis-developer > -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) ============================================== Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Visit http://linfiniti.com to find out about: * QGIS programming and support services * Mapserver and PostGIS based hosting plans * FOSS Consulting Services Skype: timlinux Irc: timlinux on #qgis at freenode.net ============================================== _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
