[Qgis-developer] connect to QgsLegend::currentItemChanged

Tom Elwertowski telwertowski at comcast.net
Wed Mar 29 17:12:32 EST 2006


Radim Blazek wrote:
> I added
>  signal QgsLegend::currentLayerChanged(QgsMapLayer *)
>  QgsLegend * QgisApp::legend()
>  signal QgisIface::currentLayerChanged ( QgsMapLayer * )
> but  emit QgisIface::currentLayerChanged does not want to compile.
> I don't know why.

Hi Radim,

QgisIface needs the Q_OBJECT macro when signals are defined. You also 
have to add qgisiface.moc.cpp to the list of moc files to be generated 
in Makefile.am. The emit should then compile.

Tom



More information about the Qgis-developer mailing list