Skip to content

Commit

Permalink
give focus to the combo so QgsFieldExpressionWidget can be used as a …
Browse files Browse the repository at this point in the history
…delegate (allow pressing expression dialog button)
  • Loading branch information
3nids committed May 7, 2014
1 parent 0575c71 commit b522991
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsfieldexpressionwidget.cpp
Expand Up @@ -43,6 +43,11 @@ QgsFieldExpressionWidget::QgsFieldExpressionWidget( QWidget *parent )
layout->addWidget( mCombo );
layout->addWidget( mButton );

// give focus to the combo
// hence if the widget is used as a delegate
// it will allow pressing on the expression dialog button
setFocusProxy( mCombo );

connect( mCombo->lineEdit(), SIGNAL( textEdited( QString ) ), this, SLOT( expressionEdited( QString ) ) );
connect( mCombo->lineEdit(), SIGNAL( editingFinished() ), this, SLOT( expressionEditingFinished() ) );
connect( mCombo, SIGNAL( activated( int ) ), this, SLOT( currentFieldChanged( int ) ) );
Expand Down

0 comments on commit b522991

Please sign in to comment.