QSignalMapper *styleMapper = new QSignalMapper( this );
connect( styleMapper, SIGNAL( mapped( const QString& ) ), this, SLOT( makeStyle( const QString& ) ) );
connect( a, SIGNAL( activated() ), styleMapper, SLOT(map()) );
styleMapper->setMapping( a, a->text() );
这是QTexamples里面themes里的themes.cpp的四句,或许对你有帮助……