Skip to content
Permalink
Browse files

give focus to the combo so QgsFieldExpressionWidget can be used as a …

…delegate (allow pressing expression dialog button)
  • Loading branch information
3nids committed May 7, 2014
1 parent 0575c71 commit b52299132e2abe1b24fbe820871d3f6e36828402
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/qgsfieldexpressionwidget.cpp
@@ -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 ) ) );

0 comments on commit b522991

Please sign in to comment.
You can’t perform that action at this time.