rem: int idx = mParameterList.findIndex( mParameter ); QComboBox *cb = (QComboBox*)paramWidget->child("combo"); Q_ASSERT( cb ); cb->clear(); cb->insertStringList( mParameterList ); if ( idx < 0 ) { cb->insertItem( mParameter ); cb->setCurrentItem( cb->count() - 1 ); } else { cb->setCurrentItem( idx ); } QLineEdit *le = (QLineEdit*)paramWidget->child("ledit"); Q_ASSERT( le ); le->setText( mValue );
add: KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget ); assert( ic ); ic->setCurrentIdentity( mParameter );
context: void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const{  int idx = mParameterList.findIndex( mParameter );  QComboBox *cb = (QComboBox*)paramWidget->child("combo");  Q_ASSERT( cb );  cb->clear();  cb->insertStringList( mParameterList );  if ( idx < 0 ) {    cb->insertItem( mParameter );    cb->setCurrentItem( cb->count() - 1 );  } else {    cb->setCurrentItem( idx );  }  QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");  Q_ASSERT( le );  le->setText( mValue );}